From ae01f2b58b76bc963139fc52ecb50af599401cc8 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sun, 4 Sep 2016 03:53:28 +1200 Subject: [PATCH] rename.2: Clarify that ERRORS may cause rename to fail (not to be nonatomic) The existing wording suggests that there are ERRORS that may cause the operation to be nonatomic. The point is of course that there are various restrictions on rename operations that may cause the operation to fail. Reported-by: Tim Savannah Signed-off-by: Michael Kerrisk --- man2/rename.2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/man2/rename.2 b/man2/rename.2 index 30242af8e..f457dabd2 100644 --- a/man2/rename.2 +++ b/man2/rename.2 @@ -79,10 +79,12 @@ Open file descriptors for .I oldpath are also unaffected. +Various restrictions determine whether or not the rename operation succeeds: +see ERRORS below. + If .I newpath -already exists, it will be atomically replaced (subject to -a few conditions; see ERRORS below), so that there is +already exists, it will be atomically replaced, so that there is no point at which another process attempting to access .I newpath will find it missing.