Creating a lock file in csh?

Robert Hartman rhartman at thestepchild.sgi.com
Thu Apr 18 04:36:52 AEST 1991


In article <1991Apr17.102654.4476 at athena.mit.edu> jik at athena.mit.edu (Jonathan I. Kamens) writes:
>
>Let's assume that two processes are trying to get a lock in this way at
>the same time over NFS.  There is no way in the NFS protocol to open a file
>for write if it does not exist in an atomic operation.  Therefore, NFS client
>kernels first have to check with the server to see if the file exists, and
>send a request to create it if it doesn't.  So here's what could happen:
>
>  [ description of resulting race condition omitted ]
>
>-- 
>Jonathan Kamens			              USnail:

Thank you Jonathan!

I guess the real solution would be for someone to write a "lock" command
that makes the NFS lock manager accessible at the user level.  Don't think
I'll hold my breath though ... ;^)

-r



More information about the Comp.unix.shell mailing list