Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!ogicse!intelhf!ichips!iwarp.intel.com!gargoyle!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.shell Subject: Re: SCCS and RCS over NFS (was: Creating a lock file in sh?) Message-ID: <1991Apr22.175620.8054@chinet.chi.il.us> Date: 22 Apr 91 17:56:20 GMT References: <1991Apr19.201517.3679@odin.corp.sgi.com> <1991Apr20.020506.8656@twinsun.com> <28124072.1774@tct.com> Organization: Chinet - Chicago Public Access UNIX Lines: 20 In article <28124072.1774@tct.com> chip@tct.com (Chip Salzenberg) writes: >>For example (Bourne shell): >> >> if (umask 777; echo >lock) >> then >> Perform whatever operation required locking. >> rm -f lock >> else >> Report that you could not obtain the lock. >> fi > >Unfortunately, this method is still prone to spurious failure when an >imperfect network loses the ACK from the initial creation attempt. Spurious failure is not nearly as bad a problem as spurious success when creating a lockfile. However, won't this always break when run by root? Les Mikesell les@chinet.chi.il.us