aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2020-12-23 12:23:21 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2020-12-23 12:23:21 +0100
commit93e2a22482b72b3076377f71347e3dd07d7dd2f8 (patch)
treeebb6659c8bdfa1387b06e801feac06f17663b4ca /shell/ash.c
parent0ab2dd4f28bfcfc0a8043c6b30fba6dca806dcb9 (diff)
downloadbusybox-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c
index f4d296289..aa2a93bca 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;
}