cu/ecu through TCP/IP (plus ecu porting status)

Albert Langer cmf851 at anu.oz.au
Tue May 21 23:21:34 AEST 1991


In article <1991May17.171141.27309 at chinet.chi.il.us> les at chinet.chi.il.us 
(Leslie Mikesell) writes:

>I'm pretty sure it isn't possible to do locks right in a shell script.
>Creating a tmp file and using /etc/link to attempt to rename it to
>the agreed-upon lockfile name is OK if it works, but you can never
>safely test or remove an existing file.   Some version of ln might
>do what you want, but SysVr3 removes the target before attempting the
>new link. 

I was under the impression it is safe to use mkdir since unlike
linking a file, that is atomic. Anyone disagree?

e.g.:

[ mkdir $lockdir ] || echo "Already locked"

--
Opinions disclaimed (Authoritative answer from opinion server)
Header reply address wrong. Use cmf851 at csc2.anu.edu.au



More information about the Comp.unix.sysv386 mailing list