emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r110987: movemail: treat EACCES etc.


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110987: movemail: treat EACCES etc. failures as permanent
Date: Fri, 23 Nov 2012 00:28:06 -0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110987
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Fri 2012-11-23 00:28:06 -0800
message:
  movemail: treat EACCES etc. failures as permanent
  
  * movemail.c (main): Treat any link failure other than EEXIST as a
  permanent failure, not just EPERM.  EACCES, for example.
modified:
  lib-src/ChangeLog
  lib-src/movemail.c
=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2012-11-21 21:06:52 +0000
+++ b/lib-src/ChangeLog 2012-11-23 08:28:06 +0000
@@ -1,3 +1,9 @@
+2012-11-23  Paul Eggert  <address@hidden>
+
+       movemail: treat EACCES etc. failures as permanent
+       * movemail.c (main): Treat any link failure other than EEXIST as a
+       permanent failure, not just EPERM.  EACCES, for example.
+
 2012-11-21  Paul Eggert  <address@hidden>
 
        Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945).

=== modified file 'lib-src/movemail.c'
--- a/lib-src/movemail.c        2012-11-21 21:06:52 +0000
+++ b/lib-src/movemail.c        2012-11-23 08:28:06 +0000
@@ -328,11 +328,8 @@
 
          tem = link (tempname, lockname);
 
-#ifdef EPERM
-         if (tem < 0 && errno == EPERM)
-           fatal ("Unable to create hard link between %s and %s",
-                  tempname, lockname);
-#endif
+         if (tem < 0 && errno != EEXIST)
+           pfatal_with_name (lockname);
 
          unlink (tempname);
          if (tem >= 0)


reply via email to

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