diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-29 16:53:11 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-29 16:53:11 +0100 |
| commit | 77a51a2709de1b646ab493f0bf771d896de6efc2 (patch) | |
| tree | d0e44b91d8391ca06d4de3f7d5101da76c4f940e /shell | |
| parent | c7ef8187688b0e7f92d19b3fed2c4ecffe39a688 (diff) | |
| download | busybox-w32-77a51a2709de1b646ab493f0bf771d896de6efc2.tar.gz busybox-w32-77a51a2709de1b646ab493f0bf771d896de6efc2.tar.bz2 busybox-w32-77a51a2709de1b646ab493f0bf771d896de6efc2.zip | |
randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/hush.c | 4 |
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 { | |||
| 653 | /* used for "[[ EXPR ]]" */ | 653 | /* used for "[[ EXPR ]]" */ |
| 654 | # define CMD_TEST2_SINGLEWORD_NOGLOB 2 | 654 | # define CMD_TEST2_SINGLEWORD_NOGLOB 2 |
| 655 | #endif | 655 | #endif |
| 656 | #if ENABLE_HUSH_LOCAL || ENABLE_HUSH_EXPORT || ENABLE_HUSH_READONLY | 656 | #if BASH_TEST2 || ENABLE_HUSH_LOCAL || ENABLE_HUSH_EXPORT || ENABLE_HUSH_READONLY |
| 657 | /* used to prevent word splitting and globbing in "export v=t*" */ | 657 | /* used to prevent word splitting and globbing in "export v=t*" */ |
| 658 | # define CMD_SINGLEWORD_NOGLOB 3 | 658 | # define CMD_SINGLEWORD_NOGLOB 3 |
| 659 | #endif | 659 | #endif |
| @@ -8762,6 +8762,7 @@ static int process_wait_result(struct pipe *fg_pipe, pid_t childpid, int status) | |||
| 8762 | */ | 8762 | */ |
| 8763 | if (WIFSIGNALED(status)) { | 8763 | if (WIFSIGNALED(status)) { |
| 8764 | int sig = WTERMSIG(status); | 8764 | int sig = WTERMSIG(status); |
| 8765 | #if ENABLE_HUSH_JOB | ||
| 8765 | if (G.run_list_level == 1 | 8766 | if (G.run_list_level == 1 |
| 8766 | /* ^^^^^ Do not print in nested contexts, example: | 8767 | /* ^^^^^ Do not print in nested contexts, example: |
| 8767 | * echo `sleep 1; sh -c 'kill -9 $$'` - prints "137", NOT "Killed 137" | 8768 | * 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) | |||
| 8771 | /* strsignal() is for bash compat. ~600 bloat versus bbox's get_signame() */ | 8772 | /* strsignal() is for bash compat. ~600 bloat versus bbox's get_signame() */ |
| 8772 | puts(sig == SIGINT || sig == SIGPIPE ? "" : strsignal(sig)); | 8773 | puts(sig == SIGINT || sig == SIGPIPE ? "" : strsignal(sig)); |
| 8773 | } | 8774 | } |
| 8775 | #endif | ||
| 8774 | /* TODO: if (WCOREDUMP(status)) + " (core dumped)"; */ | 8776 | /* TODO: if (WCOREDUMP(status)) + " (core dumped)"; */ |
| 8775 | /* MIPS has 128 sigs (1..128), if sig==128, | 8777 | /* MIPS has 128 sigs (1..128), if sig==128, |
| 8776 | * 128 + sig would result in exitcode 256 -> 0! | 8778 | * 128 + sig would result in exitcode 256 -> 0! |
