emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#29961: closed ([PATCH] mv: document the missing at


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#29961: closed ([PATCH] mv: document the missing atomicity of 'mv -n')
Date: Wed, 10 Jan 2018 08:54:02 +0000

Your message dated Wed, 10 Jan 2018 00:53:07 -0800
with message-id <address@hidden>
and subject line Re: bug#29961: [PATCH] mv -n: do not overwrite the destination
has caused the debbugs.gnu.org bug report #29961,
regarding [PATCH] mv: document the missing atomicity of 'mv -n'
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
29961: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29961
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] mv: document the missing atomicity of 'mv -n' Date: Wed, 3 Jan 2018 16:01:47 +0100
* src/mv.c (usage): Add note about the missing atomicity of 'mv -n'.
* doc/coreutils.texi (mv invocation): Likewise.
---
 doc/coreutils.texi | 3 +++
 src/mv.c           | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 3fa083085..e7ca6a737 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -9660,6 +9660,9 @@ If the response is not affirmative, the file is skipped.
 Do not overwrite an existing file.
 @mvOptsIfn
 This option is mutually exclusive with @option{-b} or @option{--backup} option.
+Note that the operation is not atomic.  If @var{dest} appears after
address@hidden has checked its non-existence, it can be overwritten despite
+the @option{-n} option is used.
 
 @item -u
 @itemx --update
diff --git a/src/mv.c b/src/mv.c
index a8df730a7..a08e75649 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -306,6 +306,8 @@ Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n\
   -i, --interactive            prompt before overwrite\n\
   -n, --no-clobber             do not overwrite an existing file\n\
 If you specify more than one of -i, -f, -n, only the final one takes effect.\n\
+NOTE: The operation is not atomic.  If DEST appears after mv has checked its\n\
+non-existence, it can be overwritten despite the -n option is used.\n\
 "), stdout);
       fputs (_("\
       --strip-trailing-slashes  remove any trailing slashes from each SOURCE\n\
-- 
2.13.6




--- End Message ---
--- Begin Message --- Subject: Re: bug#29961: [PATCH] mv -n: do not overwrite the destination Date: Wed, 10 Jan 2018 00:53:07 -0800 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 No further comment, so I installed the proposed patches and I'm closing this bug report.


--- End Message ---

reply via email to

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