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.
This commit is contained in:
parent
95ef7787fb
commit
e6bac8768b
2 changed files with 8 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue