removing hard linked directories (sysv lacks atomic rename)
Leslie Mikesell
les at chinet.chi.il.us
Sat Mar 23 13:48:04 AEST 1991
In article <1991Mar21.200251.2272 at athena.mit.edu> jik at athena.mit.edu (Jonathan I. Kamens) writes:
> A kernel without an atomic rename operation (or, at least, a rename
>operation that tries to be atomic, although it might fail to be completely
>atomic in the case of some network filesystems) is, in my opinion,
>brain-damaged. Which is what I said in my original message. Thank you for
>spelling out the particular form the brain-damage takes in this case :-).
Welcome to the wonderful world of SysV, where you can't safely do
something as simple as maintain your configuration files in multi-user
mode. The fact that there is a point where both links appear is
the least of the problems. Since link() will fail if the destination
already exists, you must unlink the existing copy first, leaving an
indeterminate amount of time where the filename does not exist at all
until you get around to linking the new copy under the old name.
Les Mikesell
les at chinet.chi.il.us
More information about the Comp.unix.questions
mailing list