shell: for signal exitcode, use 128 | sig, not 128 + sig - MIPS has signal 128
function old new delta wait_for_child_or_signal 213 214 +1 refill_HFILE_and_getc 89 88 -1 getstatus 97 96 -1 builtin_wait 339 337 -2 checkjobs 187 183 -4 process_wait_result 450 444 -6 waitcmd 290 281 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/6 up/down: 1/-23) Total: -22 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -4610,7 +4610,7 @@ getstatus(struct job *job)
|
||||
job->sigint = 1;
|
||||
#endif
|
||||
}
|
||||
retval += 128;
|
||||
retval |= 128;
|
||||
}
|
||||
TRACE(("getstatus: job %d, nproc %d, status 0x%x, retval 0x%x\n",
|
||||
jobno(job), job->nprocs, status, retval));
|
||||
@ -4676,7 +4676,7 @@ waitcmd(int argc UNUSED_PARAM, char **argv)
|
||||
if (status != -1 && !WIFSTOPPED(status)) {
|
||||
retval = WEXITSTATUS(status);
|
||||
if (WIFSIGNALED(status))
|
||||
retval = WTERMSIG(status) + 128;
|
||||
retval = 128 | WTERMSIG(status);
|
||||
goto ret;
|
||||
}
|
||||
}
|
||||
@ -4711,7 +4711,7 @@ waitcmd(int argc UNUSED_PARAM, char **argv)
|
||||
ret:
|
||||
return retval;
|
||||
sigout:
|
||||
retval = 128 + pending_sig;
|
||||
retval = 128 | pending_sig;
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user