diff options
Diffstat (limited to 'contrib/tcsh/sh.sem.c')
-rw-r--r-- | contrib/tcsh/sh.sem.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/contrib/tcsh/sh.sem.c b/contrib/tcsh/sh.sem.c index 2ff1399..cebba05 100644 --- a/contrib/tcsh/sh.sem.c +++ b/contrib/tcsh/sh.sem.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.sem.c,v 3.53 2001/08/06 23:52:03 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.sem.c,v 3.56 2002/03/08 17:36:46 christos Exp $ */ /* * sh.sem.c: I/O redirections and job forking. A touchy issue! * Most stuff with builtins is incorrect @@ -15,11 +15,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -37,7 +33,7 @@ */ #include "sh.h" -RCSID("$Id: sh.sem.c,v 3.53 2001/08/06 23:52:03 christos Exp $") +RCSID("$Id: sh.sem.c,v 3.56 2002/03/08 17:36:46 christos Exp $") #include "tc.h" #include "tw.h" @@ -88,10 +84,11 @@ static void chkclob __P((char *)); /*VARARGS 1*/ void -execute(t, wanttty, pipein, pipeout) +execute(t, wanttty, pipein, pipeout, do_glob) register struct command *t; int wanttty; int *pipein, *pipeout; + bool do_glob; { #ifdef VFORK extern bool use_fork; /* use fork() instead of vfork()? */ @@ -660,7 +657,7 @@ execute(t, wanttty, pipein, pipeout) break; } if (t->t_dtyp != NODE_PAREN) { - doexec(t); + doexec(t, do_glob); /* NOTREACHED */ } /* @@ -679,31 +676,31 @@ execute(t, wanttty, pipein, pipeout) didfds = 0; wanttty = -1; t->t_dspr->t_dflg |= t->t_dflg & F_NOINTERRUPT; - execute(t->t_dspr, wanttty, NULL, NULL); + execute(t->t_dspr, wanttty, NULL, NULL, do_glob); exitstat(); case NODE_PIPE: #ifdef BACKPIPE t->t_dcdr->t_dflg |= F_PIPEIN | (t->t_dflg & (F_PIPEOUT | F_AMPERSAND | F_NOFORK | F_NOINTERRUPT)); - execute(t->t_dcdr, wanttty, pv, pipeout); + execute(t->t_dcdr, wanttty, pv, pipeout, do_glob); t->t_dcar->t_dflg |= F_PIPEOUT | (t->t_dflg & (F_PIPEIN | F_AMPERSAND | F_STDERR | F_NOINTERRUPT)); - execute(t->t_dcar, wanttty, pipein, pv); + execute(t->t_dcar, wanttty, pipein, pv, do_glob); #else /* !BACKPIPE */ t->t_dcar->t_dflg |= F_PIPEOUT | (t->t_dflg & (F_PIPEIN | F_AMPERSAND | F_STDERR | F_NOINTERRUPT)); - execute(t->t_dcar, wanttty, pipein, pv); + execute(t->t_dcar, wanttty, pipein, pv, do_glob); t->t_dcdr->t_dflg |= F_PIPEIN | (t->t_dflg & (F_PIPEOUT | F_AMPERSAND | F_NOFORK | F_NOINTERRUPT)); - execute(t->t_dcdr, wanttty, pv, pipeout); + execute(t->t_dcdr, wanttty, pv, pipeout, do_glob); #endif /* BACKPIPE */ break; case NODE_LIST: if (t->t_dcar) { t->t_dcar->t_dflg |= t->t_dflg & F_NOINTERRUPT; - execute(t->t_dcar, wanttty, NULL, NULL); + execute(t->t_dcar, wanttty, NULL, NULL, do_glob); /* * In strange case of A&B make a new job after A */ @@ -714,7 +711,7 @@ execute(t, wanttty, pipein, pipeout) if (t->t_dcdr) { t->t_dcdr->t_dflg |= t->t_dflg & (F_NOFORK | F_NOINTERRUPT); - execute(t->t_dcdr, wanttty, NULL, NULL); + execute(t->t_dcdr, wanttty, NULL, NULL, do_glob); } break; @@ -722,7 +719,7 @@ execute(t, wanttty, pipein, pipeout) case NODE_AND: if (t->t_dcar) { t->t_dcar->t_dflg |= t->t_dflg & F_NOINTERRUPT; - execute(t->t_dcar, wanttty, NULL, NULL); + execute(t->t_dcar, wanttty, NULL, NULL, do_glob); if ((getn(varval(STRstatus)) == 0) != (t->t_dtyp == NODE_AND)) { return; @@ -731,7 +728,7 @@ execute(t, wanttty, pipein, pipeout) if (t->t_dcdr) { t->t_dcdr->t_dflg |= t->t_dflg & (F_NOFORK | F_NOINTERRUPT); - execute(t->t_dcdr, wanttty, NULL, NULL); + execute(t->t_dcdr, wanttty, NULL, NULL, do_glob); } break; |