diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-24 01:43:21 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-24 01:43:21 +0200 |
commit | 2f7894b1bb60ab12b518fac5ea5928f3ec01de28 (patch) | |
tree | 98bce8853fdd7e92fb86550bce21c3019d727c1a | |
parent | ecb179b6d72c58acbdbc707538d7562bc1c0a880 (diff) | |
download | busybox-w32-2f7894b1bb60ab12b518fac5ea5928f3ec01de28.tar.gz busybox-w32-2f7894b1bb60ab12b518fac5ea5928f3ec01de28.tar.bz2 busybox-w32-2f7894b1bb60ab12b518fac5ea5928f3ec01de28.zip |
ash,hush: fix trap reporting: s/SIGEXIT/EXIT/
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | shell/ash.c | 3 | ||||
-rw-r--r-- | shell/hush.c | 2 | ||||
-rw-r--r-- | shell/hush_test/hush-trap/usage.right | 12 |
3 files changed, 9 insertions, 8 deletions
diff --git a/shell/ash.c b/shell/ash.c index b7c643195..597bc2808 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -12259,8 +12259,9 @@ trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
12259 | if (!*ap) { | 12259 | if (!*ap) { |
12260 | for (signo = 0; signo < NSIG; signo++) { | 12260 | for (signo = 0; signo < NSIG; signo++) { |
12261 | if (trap[signo] != NULL) { | 12261 | if (trap[signo] != NULL) { |
12262 | out1fmt("trap -- %s SIG%s\n", | 12262 | out1fmt("trap -- %s %s%s\n", |
12263 | single_quote(trap[signo]), | 12263 | single_quote(trap[signo]), |
12264 | (signo == 0 ? "" : "SIG"), | ||
12264 | get_signame(signo)); | 12265 | get_signame(signo)); |
12265 | } | 12266 | } |
12266 | } | 12267 | } |
diff --git a/shell/hush.c b/shell/hush.c index 9db2091dd..85a45dd6b 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -7099,7 +7099,7 @@ static int FAST_FUNC builtin_trap(char **argv) | |||
7099 | printf("trap -- "); | 7099 | printf("trap -- "); |
7100 | print_escaped(G.traps[i]); | 7100 | print_escaped(G.traps[i]); |
7101 | /* bash compat: it says SIGxxx, not just xxx */ | 7101 | /* bash compat: it says SIGxxx, not just xxx */ |
7102 | printf(" SIG%s\n", get_signame(i)); | 7102 | printf(" %s%s\n", i == 0 ? "" : "SIG", get_signame(i)); |
7103 | } | 7103 | } |
7104 | } | 7104 | } |
7105 | /*fflush(stdout); - done after each builtin anyway */ | 7105 | /*fflush(stdout); - done after each builtin anyway */ |
diff --git a/shell/hush_test/hush-trap/usage.right b/shell/hush_test/hush-trap/usage.right index c0dbd6c3c..5b90222f8 100644 --- a/shell/hush_test/hush-trap/usage.right +++ b/shell/hush_test/hush-trap/usage.right | |||
@@ -2,13 +2,13 @@ ___ | |||
2 | ___ | 2 | ___ |
3 | ___ | 3 | ___ |
4 | trap -- 'a' EXIT | 4 | trap -- 'a' EXIT |
5 | trap -- 'a' INT | 5 | trap -- 'a' SIGINT |
6 | trap -- 'a' USR1 | 6 | trap -- 'a' SIGUSR1 |
7 | trap -- 'a' USR2 | 7 | trap -- 'a' SIGUSR2 |
8 | ___ | 8 | ___ |
9 | ___ | 9 | ___ |
10 | trap -- 'a' USR1 | 10 | trap -- 'a' SIGUSR1 |
11 | trap -- 'a' USR2 | 11 | trap -- 'a' SIGUSR2 |
12 | ___ | 12 | ___ |
13 | ___ | 13 | ___ |
14 | trap -- 'a' USR2 | 14 | trap -- 'a' SIGUSR2 |