home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.29 / text0019.txt < prev    next >
Encoding:
Text File  |  1992-12-26  |  1.3 KB  |  34 lines

  1. Submitted-by: lebrun@ll.mit.edu ("Steven F. LeBrun")
  2.  
  3. I am looking for a method of file locking what works across NFS
  4. mounted directories and am interested on what methods other 
  5. people are using.
  6.  
  7. I tried flock() and discovered a bug that only exists if the file 
  8. being locked is a remote (NFS) file.  If a program terminates without 
  9. unlocking an NFS file (due to a system reboot, user abort, program 
  10. bug [this is how I discovered the problem -- bugs can be useful at 
  11. times :-) etc.] the file remains locked so that no other programs 
  12. can access the file.
  13.  
  14. The programs that access the file are running on different computers 
  15. with the same file accessible via NFS mounts.  Currently, the programs 
  16. are all running on SGI Indigo's (IRIX 4.0.1) and other computers of 
  17. unknown type will be added later.  I would prefer staying with advisory 
  18. file locking but manditory file locking is an option.  Since the file
  19. being locked is a log/audit trail file that the programs append their
  20. next entries, locking the entire file is acceptable.  Locking the next
  21. local record (next entry) and the entire file will have the same 
  22. effect on the programs accessing the file.
  23.  
  24.  
  25. --
  26. Steven F. LeBrun
  27. lebrun@ll.mit.edu
  28.  
  29. [ Note crosspostings, and Followup line.  Feel free to post any followups
  30.   here (comp.std.unix) if you feel it relevent. -- mod ]
  31.  
  32. Volume-Number: Volume 29, Number 21
  33.  
  34.