diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/trap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/trap.c b/src/trap.c index 16703b3..3f93c46 100644 --- a/src/trap.c +++ b/src/trap.c @@ -117,8 +117,10 @@ trapcmd(int argc, char **argv) else action = *ap++; while (*ap) { - if ((signo = decode_signal(*ap, 0)) < 0) - sh_error("%s: bad trap", *ap); + if ((signo = decode_signal(*ap, 0)) < 0) { + outfmt(out2, "trap: %s: bad trap\n", *ap); + return 1; + } INTOFF; if (action) { if (action[0] == '-' && action[1] == '\0') |