Commit e6bac876 authored by Paul Eggert's avatar Paul Eggert
Browse files

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.
parent 95ef7787
2012-11-23 Paul Eggert <eggert@cs.ucla.edu>
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 <eggert@cs.ucla.edu>
Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945).
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment