home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!news.larc.nasa.gov!darwin.sura.net!jmalcolm
- From: jmalcolm@sura.net (Joseph Malcolm)
- Subject: locking under NFS
- Message-ID: <1992Aug19.223729.3725@sura.net>
- Keywords: locking under NFS
- Sender: news@sura.net (USENET News System)
- Organization: SURAnet, College Park, MD, USA, NA, Earth, Milky Way
- References: <1992Aug19.082244.61337@ilx018.intel.com> <1992Aug19.124414.5341@news.eng.convex.com>
- Date: Wed, 19 Aug 1992 22:37:29 GMT
- Lines: 17
-
- In article <1992Aug19.124414.5341@news.eng.convex.com> tchrist@convex.COM (Tom Christiansen) writes:
- >However, you've been misled regarding the safety of the cited lockfile
- >strategy over NFS. Neither creation nor deletion are atomic there.
-
- Yep.
-
- >You should use lockf, who'll use the lockd, who'll likely hang your
- >kernel.:-( Sigh. You might try the link strategy, but I don't know
- >whether that's guaranteed either.
-
- I believe the safest way is to try to link to the lock file,
- ignore the return value (the original return could have been
- lost and of course the retry will fail), and then make sure the
- file you were locking from now has two links.
-
- --
- Joseph Malcolm jmalcolm@sura.net
-