home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / programm / 4629 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  1.8 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!gatech!hubcap!ncrcae!ncrlnk!ncr-mpd!Chuck.Phillips
  2. From: Chuck.Phillips@FtCollinsCO.NCR.COM (Chuck Phillips)
  3. Newsgroups: comp.unix.programmer
  4. Subject: Re: File Locking across NFS mounts
  5. Message-ID: <CHUCK.PHILLIPS.92Sep10111322@halley.FtCollinsCO.NCR.COM>
  6. Date: 10 Sep 92 10:13:22 GMT
  7. References: <18j4hdINNdst@ftp.UU.NET>
  8. Sender: uucp@ncr-mpd.FtCollins.NCR.COM
  9. Followup-To: comp.unix.programmer
  10. Organization: NCR Microelectronics, Ft. Collins, CO
  11. Lines: 25
  12. In-reply-to: lebrun@ll.mit.edu's message of 8 Sep 92 21:04:45 GMT
  13.  
  14. >>>>> On 8 Sep 92 21:04:45 GMT, lebrun@ll.mit.edu ("Steven F. LeBrun") said:
  15. Steven> Submitted-by: lebrun@ll.mit.edu ("Steven F. LeBrun")
  16.  
  17. Steven> I am looking for a method of file locking what works across NFS
  18. Steven> mounted directories and am interested on what methods other people
  19. Steven> are using.
  20.  
  21. Steven> I tried flock() and discovered a bug that only exists if the file 
  22. Steven> being locked is a remote (NFS) file.  If a program terminates without 
  23. Steven> unlocking an NFS file (due to a system reboot, user abort, program 
  24. Steven> bug [this is how I discovered the problem -- bugs can be useful at 
  25. Steven> times :-) etc.] the file remains locked so that no other programs 
  26. Steven> can access the file.
  27.  
  28. Under SunOS, lockf() (and fcntl() based locks) are supposed to work with NFS.
  29. I say "supposed" because this feature was broken in early versions of SunOS
  30. 4.0.x, fixed, then broken again with the initial release of 4.1.  I don't
  31. know the current status, but while it _was_ working, we were able to lock
  32. files across Sun and non-Sun machines.  Because it broke again, we were
  33. forced to find alternate solutions as were a few of our software suppliers.
  34. --
  35. Chuck Phillips  MS440
  36. NCR Microelectronics             Chuck.Phillips@FtCollinsCO.NCR.COM
  37. 2001 Danfield Ct.
  38. Ft. Collins, CO.  80525
  39.