From 77a51a2709de1b646ab493f0bf771d896de6efc2 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 29 Dec 2020 16:53:11 +0100 Subject: randomconfig fixes Signed-off-by: Denys Vlasenko --- shell/hush.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'shell') 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! -- cgit v1.2.3