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