ash,hush: fix trap reporting: s/SIGEXIT/EXIT/
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
ecb179b6d7
commit
2f7894b1bb
@ -12259,8 +12259,9 @@ trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
|||||||
if (!*ap) {
|
if (!*ap) {
|
||||||
for (signo = 0; signo < NSIG; signo++) {
|
for (signo = 0; signo < NSIG; signo++) {
|
||||||
if (trap[signo] != NULL) {
|
if (trap[signo] != NULL) {
|
||||||
out1fmt("trap -- %s SIG%s\n",
|
out1fmt("trap -- %s %s%s\n",
|
||||||
single_quote(trap[signo]),
|
single_quote(trap[signo]),
|
||||||
|
(signo == 0 ? "" : "SIG"),
|
||||||
get_signame(signo));
|
get_signame(signo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7099,7 +7099,7 @@ static int FAST_FUNC builtin_trap(char **argv)
|
|||||||
printf("trap -- ");
|
printf("trap -- ");
|
||||||
print_escaped(G.traps[i]);
|
print_escaped(G.traps[i]);
|
||||||
/* bash compat: it says SIGxxx, not just xxx */
|
/* bash compat: it says SIGxxx, not just xxx */
|
||||||
printf(" SIG%s\n", get_signame(i));
|
printf(" %s%s\n", i == 0 ? "" : "SIG", get_signame(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*fflush(stdout); - done after each builtin anyway */
|
/*fflush(stdout); - done after each builtin anyway */
|
||||||
|
@ -2,13 +2,13 @@ ___
|
|||||||
___
|
___
|
||||||
___
|
___
|
||||||
trap -- 'a' EXIT
|
trap -- 'a' EXIT
|
||||||
trap -- 'a' INT
|
trap -- 'a' SIGINT
|
||||||
trap -- 'a' USR1
|
trap -- 'a' SIGUSR1
|
||||||
trap -- 'a' USR2
|
trap -- 'a' SIGUSR2
|
||||||
___
|
___
|
||||||
___
|
___
|
||||||
trap -- 'a' USR1
|
trap -- 'a' SIGUSR1
|
||||||
trap -- 'a' USR2
|
trap -- 'a' SIGUSR2
|
||||||
___
|
___
|
||||||
___
|
___
|
||||||
trap -- 'a' USR2
|
trap -- 'a' SIGUSR2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user