[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] extensions on tmp filenames?

From: Ralph Corderoy
Subject: Re: [Nmh-workers] extensions on tmp filenames?
Date: Mon, 03 Feb 2014 11:00:55 +0000

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.


> 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

Cheers, Ralph.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]