diff options
author | cracauer <cracauer@FreeBSD.org> | 1999-04-01 13:27:36 +0000 |
---|---|---|
committer | cracauer <cracauer@FreeBSD.org> | 1999-04-01 13:27:36 +0000 |
commit | 5610584759a8f26e412dab049cd02e3a33a2d256 (patch) | |
tree | 8e1d1ff2895d740ebfae1a16cedd73afd5ed5078 /bin/sh/trap.c | |
parent | fa9cc0ebfb3821fac3240755fae227fa654a37f7 (diff) | |
download | FreeBSD-src-5610584759a8f26e412dab049cd02e3a33a2d256.zip FreeBSD-src-5610584759a8f26e412dab049cd02e3a33a2d256.tar.gz |
The immediate execution of traps I introduced in September 1998 (to
make /etc/rc interruptible in cases when programs hang with blocked
signals) isn't standard enough.
It is now switched off by default and a new switch -T enables it.
You should update /etc/rc to the version I'm about to commit in a few
minutes to keep it interruptible.
Diffstat (limited to 'bin/sh/trap.c')
-rw-r--r-- | bin/sh/trap.c | 5 |
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; |