aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2020-12-29 16:53:11 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2020-12-29 16:53:11 +0100
commit77a51a2709de1b646ab493f0bf771d896de6efc2 (patch)
treed0e44b91d8391ca06d4de3f7d5101da76c4f940e /shell
parentc7ef8187688b0e7f92d19b3fed2c4ecffe39a688 (diff)
downloadbusybox-77a51a2709de1b646ab493f0bf771d896de6efc2.tar.gz
randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/hush.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c
index f5cbbc39f..9fead37da 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -653,7 +653,7 @@ struct command {
/* used for "[[ EXPR ]]" */
# define CMD_TEST2_SINGLEWORD_NOGLOB 2
#endif
-#if ENABLE_HUSH_LOCAL || ENABLE_HUSH_EXPORT || ENABLE_HUSH_READONLY
+#if BASH_TEST2 || ENABLE_HUSH_LOCAL || ENABLE_HUSH_EXPORT || ENABLE_HUSH_READONLY
/* used to prevent word splitting and globbing in "export v=t*" */
# define CMD_SINGLEWORD_NOGLOB 3
#endif
@@ -8762,6 +8762,7 @@ static int process_wait_result(struct pipe *fg_pipe, pid_t childpid, int status)
*/
if (WIFSIGNALED(status)) {
int sig = WTERMSIG(status);
+#if ENABLE_HUSH_JOB
if (G.run_list_level == 1
/* ^^^^^ Do not print in nested contexts, example:
* echo `sleep 1; sh -c 'kill -9 $$'` - prints "137", NOT "Killed 137"
@@ -8771,6 +8772,7 @@ static int process_wait_result(struct pipe *fg_pipe, pid_t childpid, int status)
/* strsignal() is for bash compat. ~600 bloat versus bbox's get_signame() */
puts(sig == SIGINT || sig == SIGPIPE ? "" : strsignal(sig));
}
+#endif
/* TODO: if (WCOREDUMP(status)) + " (core dumped)"; */
/* MIPS has 128 sigs (1..128), if sig==128,
* 128 + sig would result in exitcode 256 -> 0!