hush: output bash-compat killing signal names

This significantly syncronises ash-signals and hush-signals tests.

function                                             old     new   delta
process_wait_result                                  449     450      +1

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2020-10-24 04:26:43 +02:00
parent b65d6cb00f
commit e16f7eb596
9 changed files with 92 additions and 7 deletions

View File

@ -8704,8 +8704,8 @@ static int process_wait_result(struct pipe *fg_pipe, pid_t childpid, int status)
*/
&& i == fg_pipe->num_cmds-1
) {
/* TODO: use strsignal() instead for bash compat? but that's bloat... */
puts(sig == SIGINT || sig == SIGPIPE ? "" : get_signame(sig));
/* strsignal() is for bash compat. ~600 bloat versus bbox's get_signame() */
puts(sig == SIGINT || sig == SIGPIPE ? "" : strsignal(sig));
}
/* TODO: if (WCOREDUMP(status)) + " (core dumped)"; */
/* TODO: MIPS has 128 sigs (1..128), what if sig==128 here?