autoconf
[Top][All Lists]
Advanced

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

Re: Rename atomicity


From: Thomas E. Dickey
Subject: Re: Rename atomicity
Date: Tue, 6 Mar 2001 12:09:24 -0500 (EST)

On 6 Mar 2001, Assar Westerlund wrote:

> Mike Castle <address@hidden> writes:
> > On Sun, Mar 04, 2001 at 06:32:25AM +0100, Jim Meyering wrote:
> > > Do you know of a system on which such a use of rename is _not_ atomic?
> > 
> > NT.  (NT will happily rename() across disks, hardly an atomic operation).
> 
> What rename() is that?  It's not the one in their posix library I
> assume?  Is there a rename function in any of the ordinary set of libraries.

I'd have to argue that NT has no POSIX library (having looked at it a
while back).  But rename is documented:

The rename function renames the file or directory specified by oldname to
the name given by newname. The old name must be the path of an existing
file or directory. The new name must not be the name of an existing file
or directory. You can use rename to move a file from one directory or
device to another by giving a different path in the newname argument.
However, you cannot use rename to move a directory. Directories can be
renamed, but not moved


-- 
T.E.Dickey <address@hidden>
http://dickey.his.com
ftp://dickey.his.com




reply via email to

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