commit a19078db3265138bbd50200fbadeaec16b8a27ee
parent ef7e1b630f5660ce2f77e2fa4ee8dcf6231016d5
Author: tjg <tjg>
Date: Wed, 19 Apr 2000 14:16:32 +0000
add some extra calls to setsigdefaults
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/walk.c b/walk.c
@@ -217,6 +217,7 @@ top: sigchk();
if (n->u[0].p->type == nRedir || n->u[0].p->type == nDup) {
if (redirq == NULL && !dofork(parent)) /* subshell on first preredir */
break;
+ setsigdefaults(FALSE);
qredir(n->u[0].p);
if (!haspreredir(n->u[1].p))
doredirs(); /* no more preredirs, empty queue */
@@ -246,6 +247,7 @@ top: sigchk();
if (n->u[1].p == NULL) {
WALK(n->u[0].p, parent);
} else if (dofork(parent)) {
+ setsigdefaults(FALSE);
walk(n->u[1].p, TRUE); /* Do redirections */
redirq = NULL; /* Reset redirection queue */
walk(n->u[0].p, FALSE); /* Do commands */
@@ -321,6 +323,7 @@ static void dopipe(Node *n) {
rc_error(NULL);
}
if ((pid = rc_fork()) == 0) {
+ setsigdefaults(FALSE);
redirq = NULL; /* clear preredir queue */
mvfd(p[0], r->u[1].i);
if (fd_prev != 1)
@@ -337,6 +340,7 @@ static void dopipe(Node *n) {
close(p[0]);
}
if ((pid = rc_fork()) == 0) {
+ setsigdefaults(FALSE);
mvfd(fd_prev, fd_out);
walk(r, FALSE);
exit(getstatus());