diff options
author | Denys Vlasenko | 2020-12-23 12:23:21 +0100 |
---|---|---|
committer | Denys Vlasenko | 2020-12-23 12:23:21 +0100 |
commit | 93e2a22482b72b3076377f71347e3dd07d7dd2f8 (patch) | |
tree | ebb6659c8bdfa1387b06e801feac06f17663b4ca /shell/ash.c | |
parent | 0ab2dd4f28bfcfc0a8043c6b30fba6dca806dcb9 (diff) | |
download | busybox-93e2a22482b72b3076377f71347e3dd07d7dd2f8.zip busybox-93e2a22482b72b3076377f71347e3dd07d7dd2f8.tar.gz |
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>
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c index f4d2962..aa2a93b 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -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; } |