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-w32-93e2a22482b72b3076377f71347e3dd07d7dd2f8.tar.gz
busybox-w32-93e2a22482b72b3076377f71347e3dd07d7dd2f8.tar.bz2
busybox-w32-93e2a22482b72b3076377f71347e3dd07d7dd2f8.zip
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)
4610 job->sigint = 1; 4610 job->sigint = 1;
4611#endif 4611#endif
4612 } 4612 }
4613 retval += 128; 4613 retval |= 128;
4614 } 4614 }
4615 TRACE(("getstatus: job %d, nproc %d, status 0x%x, retval 0x%x\n", 4615 TRACE(("getstatus: job %d, nproc %d, status 0x%x, retval 0x%x\n",
4616 jobno(job), job->nprocs, status, retval)); 4616 jobno(job), job->nprocs, status, retval));
@@ -4676,7 +4676,7 @@ waitcmd(int argc UNUSED_PARAM, char **argv)
4676 if (status != -1 && !WIFSTOPPED(status)) { 4676 if (status != -1 && !WIFSTOPPED(status)) {
4677 retval = WEXITSTATUS(status); 4677 retval = WEXITSTATUS(status);
4678 if (WIFSIGNALED(status)) 4678 if (WIFSIGNALED(status))
4679 retval = WTERMSIG(status) + 128; 4679 retval = 128 | WTERMSIG(status);
4680 goto ret; 4680 goto ret;
4681 } 4681 }
4682 } 4682 }
@@ -4711,7 +4711,7 @@ waitcmd(int argc UNUSED_PARAM, char **argv)
4711 ret: 4711 ret:
4712 return retval; 4712 return retval;
4713 sigout: 4713 sigout:
4714 retval = 128 + pending_sig; 4714 retval = 128 | pending_sig;
4715 return retval; 4715 return retval;
4716} 4716}
4717 4717