Hi David,

> Well, the SUSv2 spec says:

I read this differently to you.

> If the link named by the new argument exists, it shall be removed and
> old renamed to new.

Good.

> In this case, a link named new shall remain visible to other processes
> throughout the renaming operation

IOW, other processes never observe `new' as missing.

> and refer either to the file referred to by new

So the rename hasn't occurred yet in their eyes.

> or old before the operation began.

The rename has occurred.

There's no `unstable' moment where it flitters between the two.  "rename
allows the new filename to refer to the old file, even if very briefly"
doesn't apply AFAICS.  rename("a", "b") has an existing ./b be the
existing contents up until the moment when it refers to ./a's contents
instead.

Cheers, Ralph.

_______________________________________________
Nmh-workers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to