To avoid overwriting existing command status, check for CMD_INVALID
instead of CMD_ERRNO or CMD_WSTATUS.
This commit is contained in:
@@ -193,7 +193,7 @@ mon_handle_sigchld(struct monitor_closure *mc)
|
||||
}
|
||||
|
||||
/* Don't overwrite execve() failure with child exit status. */
|
||||
if (mc->cstat->type != CMD_ERRNO) {
|
||||
if (mc->cstat->type == CMD_INVALID) {
|
||||
/*
|
||||
* Store wait status in cstat and forward to parent if stopped.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user