summaryrefslogtreecommitdiffstats
path: root/bin/sh/trap.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh/trap.c')
-rw-r--r--bin/sh/trap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/sh/trap.c b/bin/sh/trap.c
index fd359fc..429253c 100644
--- a/bin/sh/trap.c
+++ b/bin/sh/trap.c
@@ -39,7 +39,7 @@
static char sccsid[] = "@(#)trap.c 8.5 (Berkeley) 6/5/95";
#endif
static const char rcsid[] =
- "$Id: trap.c,v 1.16 1998/09/10 14:51:06 cracauer Exp $";
+ "$Id: trap.c,v 1.17 1998/09/10 22:09:11 cracauer Exp $";
#endif /* not lint */
#include <signal.h>
@@ -367,7 +367,8 @@ onsig(signo)
* If a trap is set, not ignored and not the null command, we need
* to make sure traps are executed even when a child blocks signals.
*/
- if (trap[signo] != NULL &&
+ if (Tflag &&
+ trap[signo] != NULL &&
! trap[signo][0] == '\0' &&
! (trap[signo][0] == ':' && trap[signo][1] == '\0'))
breakwaitcmd = 1;
OpenPOWER on IntegriCloud