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

  1. Path: sparky!uunet!bonnie.concordia.ca!IRO.UMontreal.CA!thomas
  2. From: thomas@IRO.UMontreal.CA (Steve Thomas)
  3. Newsgroups: comp.unix.questions
  4. Subject: lockf (file locks)
  5. Summary: Help!
  6. Keywords: mutual exclusion, file locking
  7. Message-ID: <thomas.714423728@iros1>
  8. Date: 21 Aug 92 19:02:08 GMT
  9. Sender: news@IRO.UMontreal.CA
  10. Organization: Universite de Montreal
  11. Lines: 19
  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, etc that is required.
  27.  
  28. Thanks !
  29. Steve
  30. --
  31. internet: thomas@kovic.iro.umontreal.ca
  32.