aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorPaul Eggert2012-11-23 00:28:06 -0800
committerPaul Eggert2012-11-23 00:28:06 -0800
commite6bac8768bfff6756ccf9b595e403821ff539036 (patch)
tree3e101c650cb8c25f354828f445fc1da1e4fa494b /lib-src
parent95ef7787fb0a5786a2e4f150649aadfa687a15f2 (diff)
downloademacs-e6bac8768bfff6756ccf9b595e403821ff539036.tar.gz
emacs-e6bac8768bfff6756ccf9b595e403821ff539036.zip
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.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog6
-rw-r--r--lib-src/movemail.c7
2 files changed, 8 insertions, 5 deletions
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 @@
12012-11-23 Paul Eggert <eggert@cs.ucla.edu>
2
3 movemail: treat EACCES etc. failures as permanent
4 * movemail.c (main): Treat any link failure other than EEXIST as a
5 permanent failure, not just EPERM. EACCES, for example.
6
12012-11-21 Paul Eggert <eggert@cs.ucla.edu> 72012-11-21 Paul Eggert <eggert@cs.ucla.edu>
2 8
3 Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945). 9 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)
328 328
329 tem = link (tempname, lockname); 329 tem = link (tempname, lockname);
330 330
331#ifdef EPERM 331 if (tem < 0 && errno != EEXIST)
332 if (tem < 0 && errno == EPERM) 332 pfatal_with_name (lockname);
333 fatal ("Unable to create hard link between %s and %s",
334 tempname, lockname);
335#endif
336 333
337 unlink (tempname); 334 unlink (tempname);
338 if (tem >= 0) 335 if (tem >= 0)