Re: renameat2

2017-08-18 Thread Ken Brown
Hi Corinna, On 8/18/2017 11:15 AM, Corinna Vinschen wrote: Hi Ken, On Aug 18 09:21, Ken Brown wrote: Linux has a system call 'renameat2' which is like renameat but has an extra 'flags' argument. In particular, one can pass the RENAME_NOREPLACE flag to cause the rename to fail with EEXIST if t

Re: renameat2

2017-08-18 Thread Corinna Vinschen
Hi Ken, On Aug 18 09:21, Ken Brown wrote: > Linux has a system call 'renameat2' which is like renameat but has an > extra 'flags' argument. In particular, one can pass the > RENAME_NOREPLACE flag to cause the rename to fail with EEXIST if the > target of the rename exists. See > > http://man7.

Re: renameat2

2017-08-18 Thread Ken Brown
On 8/18/2017 10:33 AM, Eric Blake wrote: Please only define RENAME_NOREPLACE for now; that way, software can probe what is defined to know what will work (defining a flag that will always be an error is not as useful as leaving it undefined - and while we may add RENAME_EXCHANGE support, I don't

Re: renameat2

2017-08-18 Thread Eric Blake
On 08/18/2017 08:21 AM, Ken Brown wrote: > Linux has a system call 'renameat2' which is like renameat but has an > extra 'flags' argument. In particular, one can pass the > RENAME_NOREPLACE flag to cause the rename to fail with EEXIST if the > target of the rename exists. See > > http://man7.or

renameat2

2017-08-18 Thread Ken Brown
Linux has a system call 'renameat2' which is like renameat but has an extra 'flags' argument. In particular, one can pass the RENAME_NOREPLACE flag to cause the rename to fail with EEXIST if the target of the rename exists. See http://man7.org/linux/man-pages/man2/rename.2.html macOS has a