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

Paul Eggert eggert at twinsun.com
Sat Apr 20 12:05:06 AEST 1991


rhartman at thestepchild.sgi.com (Robert Hartman) writes:

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

I don't know about SCCS, but RCS 5.5 uses a slightly different
technique.  The lock file never exists in writable form, avoiding the
NFS protocol bug that Jonathan Kamens described.  A similar method can
be used in the shell.  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



More information about the Comp.unix.shell mailing list