home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / perl / 5392 < prev    next >
Encoding:
Text File  |  1992-08-19  |  1.2 KB  |  30 lines

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