home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / internal / 1726 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  949 b 

  1. Path: sparky!uunet!bonnie.concordia.ca!IRO.UMontreal.CA!thomas
  2. From: thomas@IRO.UMontreal.CA (Steve Thomas)
  3. Newsgroups: comp.unix.internals
  4. Subject: file locks
  5. Summary: help with file locks
  6. Keywords: lockf, mutual exclusion
  7. Message-ID: <thomas.714424054@iros1>
  8. Date: 21 Aug 92 19:07:34 GMT
  9. Sender: news@IRO.UMontreal.CA
  10. Organization: Universite de Montreal
  11. Lines: 24
  12.  
  13. Could someone explain or provide an example
  14. of how to properly use file locks.
  15.  
  16. I am aware that chmod +l file will allow
  17. locks to be placed on a file and that
  18. the function lockf will lock the file.
  19.  
  20. I would like to allow multiple processes
  21. the ability to change the same record
  22. (or separate records) in a file but
  23. with mutual exclusion enforced.
  24.  
  25. Specifically I need the order of calls
  26. to fopen, lockf et.
  27.  
  28. I would also like each process to get the
  29. lateest (updated) copy of the file
  30. once it is allowed access to the file.
  31.  
  32. thanks
  33. Steve
  34.  
  35. --
  36. internet: thomas@kovic.iro.umontreal.ca
  37.