SCCS and RFS over NFS (was: Creating a lock file in sh?)

Robert Hartman rhartman at thestepchild.sgi.com
Sat Apr 20 06:15:17 AEST 1991


In article <784 at necssd.NEC.COM> harrison at necssd.NEC.COM (Mark Harrison) writes:
>In article <1991Apr17.201931.14536 at odin.corp.sgi.com>,
>rhartman at thestepchild.sgi.com (Robert Hartman) writes:
>
>> Aside from the fact that it isn't guaranteed over NFS, you can get some
>> measure of protection this way:
>
>	[example using lockfile]
>
>Could you elaborate on why it's not guaranteed over NFS?
>
>Mark. ("Yikes!")
>-- 
>Mark Harrison             harrison at ssd.dl.nec.com
>(214)518-5050             {necntc, cs.utexas.edu}!necssd!harrison
>standard disclaimers apply...

I was under the impression that NFS guaranteed idempotency, but when I
posted my csh example, someone followed up with an explanation of why
this is not so.  The upshot is that unless you use the NFS lock
manager, lock files over NFS are not guaranteed.

To use the NFS lock manager you need to write a C program.  As of yet I
don't think there's a command-level implementation.

My examples made it "highly unlikely" that you'd have a race condition
on the lock file.  Depending on your application, that might be good
enough.

BTW, does this imply that SCCS and RFS can also fail over NFS?  I'm not
aware of them using the NFS lock manager!

-r



More information about the Comp.unix.shell mailing list