summaryrefslogtreecommitdiff
path: root/lib-src/movemail.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-11-23 00:28:06 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2012-11-23 00:28:06 -0800
commite6bac8768bfff6756ccf9b595e403821ff539036 (patch)
tree3e101c650cb8c25f354828f445fc1da1e4fa494b /lib-src/movemail.c
parent95ef7787fb0a5786a2e4f150649aadfa687a15f2 (diff)
downloademacs-e6bac8768bfff6756ccf9b595e403821ff539036.tar.gz
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/movemail.c')
-rw-r--r--lib-src/movemail.c7
1 files changed, 2 insertions, 5 deletions
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)