Results 1 to 5 of 5

Thread: Locking question

  1. #1
    Senior Member frpeter's Avatar
    Join Date
    Dec 2004
    Posts
    131

    Locking question

    Hello,

    I have read the man pages for flock, lockf, and fcntl. I have used flock will no problems but am curios about the other methods. The locks I use are for entire files.

    Which is the better method any why?

    Thank you in advance.

  2. #2
    Senior Member
    Join Date
    Dec 2004
    Posts
    3,171
    I don't know if this answers your question completely or not but I figured seeing as no one has yet gotten around to you I'd give it a shot...

    http://www.landfield.com/isn/mail-ar.../Jun/0075.html

  3. #3
    Senior Member frpeter's Avatar
    Join Date
    Dec 2004
    Posts
    131
    Hello,

    This does help some. Thank you. But what I am really seeking are the pros and cons of each based on pratical programming experience.

  4. #4
    Custom User
    Join Date
    Oct 2001
    Posts
    503
    If you are only wanting to lock a whole file, then just keep using flock. Only bother with the other functions if you really need that sort of power. If you want to use one of the other methods, just make sure your calculations are correct.

    ac

  5. #5
    Senior Member frpeter's Avatar
    Join Date
    Dec 2004
    Posts
    131
    Hello,

    I have considered wheather locking sections would be more advantagous. However; I haven't been able to find enough information on a comparative analysis of each in regards to the pros/cons of each. Particularly, networking seems to be very hazy and conflicting on each.

    Thank you in advance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •