Use W_EXITCODE to construct the wait status if sudo could not execute
the command. Fixes the sudo exit value for exec(3) failure.
This commit is contained in:
@@ -284,6 +284,11 @@ extern int errno;
|
||||
# define WCOREDUMP(x) ((x) & 0x80)
|
||||
#endif
|
||||
|
||||
/* W_EXITCODE is not POSIX but the encoding of wait status is. */
|
||||
#ifndef W_EXITCODE
|
||||
# define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
|
||||
#endif
|
||||
|
||||
/* Number of bits in a byte. */
|
||||
#ifndef NBBY
|
||||
# ifdef __NBBY
|
||||
|
Reference in New Issue
Block a user