Lockf was exiting with status 1 if the command did not exit normally.
This is easy to confuse with the actual exit status of the program. Instead exit with EX_SOFTWARE if the command doesn't exit normally. MFC after: 1 month
This commit is contained in:
parent
503b743566
commit
7f15c32d76
@ -138,6 +138,11 @@ command line.
|
||||
A system call (e.g.,
|
||||
.Xr fork 2 )
|
||||
failed unexpectedly.
|
||||
.It Dv EX_SOFTWARE
|
||||
The
|
||||
.Ar command
|
||||
did not exit normally,
|
||||
but may have been signaled or stopped.
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr flock 2 ,
|
||||
|
@ -151,7 +151,7 @@ main(int argc, char **argv)
|
||||
signal(SIGTERM, killed);
|
||||
if (waitpid(child, &status, 0) == -1)
|
||||
err(EX_OSERR, "waitpid failed");
|
||||
return (WIFEXITED(status) ? WEXITSTATUS(status) : 1);
|
||||
return (WIFEXITED(status) ? WEXITSTATUS(status) : EX_SOFTWARE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user