nmh-workers
[Top] [All Lists]

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

2014-02-02 16:44:16
Lyndon wrote:

On Feb 2, 2014, at 6:02, David Levine <levinedl(_at_)acm(_dot_)org> wrote:

Well, that's the way it's documented.  This is when an existing
file is in the way of the new name.

Documented where?  SUSv3 calls out the behaviour explicitly, as
inherited from the ISO C spec.

Well, the SUSv2 spec says:

    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 and refer either to the file referred to by new or old
    before the operation began.

and that's what Linux still uses for its documentation.

This is pretty much moot now:  we use mkstemps if available,
and if not try link before trying rename.

David

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>