From: Paul Eggert Date: Fri, 23 Nov 2012 08:28:06 +0000 (-0800) Subject: movemail: treat EACCES etc. failures as permanent X-Git-Tag: emacs-24.3.90~173^2~18^2~16 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e6bac8768bfff6756ccf9b595e403821ff539036;p=emacs.git 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. --- diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 8e835795e6a..b85ba12a5b2 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,9 @@ +2012-11-23 Paul Eggert + + 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 Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945). diff --git a/lib-src/movemail.c b/lib-src/movemail.c index adc5dd96409..264b3d292c6 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -328,11 +328,8 @@ main (int argc, char **argv) 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)