← Commit list

2f7894b1b

Denys Vlasenko
Denys Vlasenko
2009-09-24
FAILED Duration: 38s

Subject

ash,hush: fix trap reporting: s/SIGEXIT/EXIT/

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/ash.c+2 -1
@@ -12259,8 +12259,9 @@ trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
if (!*ap) {
for (signo = 0; signo < NSIG; signo++) {
if (trap[signo] != NULL) {
- out1fmt("trap -- %s SIG%s\n",
+ out1fmt("trap -- %s %s%s\n",
single_quote(trap[signo]),
+ (signo == 0 ? "" : "SIG"),
get_signame(signo));
}
}
shell/hush.c+1 -1
@@ -7099,7 +7099,7 @@ static int FAST_FUNC builtin_trap(char **argv)
printf("trap -- ");
print_escaped(G.traps[i]);
/* 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 */
shell/hush_test/hush-trap/usage.right+6 -6
@@ -2,13 +2,13 @@ ___
___
___
trap -- 'a' EXIT
-trap -- 'a' INT
-trap -- 'a' USR1
-trap -- 'a' USR2
+trap -- 'a' SIGINT
+trap -- 'a' SIGUSR1
+trap -- 'a' SIGUSR2
___
___
-trap -- 'a' USR1
-trap -- 'a' USR2
+trap -- 'a' SIGUSR1
+trap -- 'a' SIGUSR2
___
___
-trap -- 'a' USR2
+trap -- 'a' SIGUSR2