Lines Matching refs:t
83 execute(struct command *t, volatile int wanttty, int *pipein, int *pipeout, in execute() argument
101 if (t == 0) in execute()
107 !t->t_dcdr && !t->t_dcar && !t->t_dflg && !didfds && in execute()
108 (intty || intact) && (t->t_dtyp == NODE_COMMAND) && in execute()
109 !isbfunc(t)) { in execute()
110 if ((t->t_dcom[0][0] & (QUOTE | TRIM)) == QUOTE) in execute()
111 (void) Strcpy(t->t_dcom[0], t->t_dcom[0] + 1); in execute()
112 Dfix(t); in execute()
113 if (nt_try_fast_exec(t) == 0) in execute()
124 if (implicit_cd && (intty || intact) && t->t_dcom && t->t_dcom[0] && in execute()
125 t->t_dcom[0][0] && (blklen(t->t_dcom) == 1) && !noexec) { in execute()
130 sCName = dollar(t->t_dcom[0]); in execute()
166 Char **ot_dcom = t->t_dcom; in execute()
170 t->t_dcom = blkspl(vCD, ot_dcom); in execute()
173 blkpr(t->t_dcom); in execute()
183 if (t->t_dflg & F_AMPERSAND) in execute()
185 switch (t->t_dtyp) { in execute()
188 if ((t->t_dcom[0][0] & (QUOTE | TRIM)) == QUOTE) in execute()
189 memmove(t->t_dcom[0], t->t_dcom[0] + 1, in execute()
190 (Strlen(t->t_dcom[0] + 1) + 1) * sizeof (*t->t_dcom[0])); in execute()
191 if ((t->t_dflg & F_REPEAT) == 0) in execute()
192 Dfix(t); /* $ " ' \ */ in execute()
193 if (t->t_dcom[0] == 0) { in execute()
200 if (t->t_dflg & F_PIPEIN) in execute()
203 if (t->t_dflg & F_PIPEOUT) in execute()
210 if (t->t_dflg & F_READ) { in execute()
216 heredoc(t->t_dlef); in execute()
231 while (t->t_dtyp == NODE_COMMAND) in execute()
232 if (eq(t->t_dcom[0], STRnice)) { in execute()
233 if (t->t_dcom[1]) { in execute()
234 if (strchr("+-", t->t_dcom[1][0])) { in execute()
235 if (t->t_dcom[2]) { in execute()
237 t->t_nice = (unsigned char)getn(t->t_dcom[1]); in execute()
238 lshift(t->t_dcom, 2); in execute()
239 t->t_dflg |= F_NICE; in execute()
245 t->t_nice = 4; in execute()
246 lshift(t->t_dcom, 1); in execute()
247 t->t_dflg |= F_NICE; in execute()
253 else if (eq(t->t_dcom[0], STRnohup)) { in execute()
254 if (t->t_dcom[1]) { in execute()
255 t->t_dflg |= F_NOHUP; in execute()
256 lshift(t->t_dcom, 1); in execute()
261 else if (eq(t->t_dcom[0], STRhup)) { in execute()
262 if (t->t_dcom[1]) { in execute()
263 t->t_dflg |= F_HUP; in execute()
264 lshift(t->t_dcom, 1); in execute()
269 else if (eq(t->t_dcom[0], STRtime)) { in execute()
270 if (t->t_dcom[1]) { in execute()
271 t->t_dflg |= F_TIME; in execute()
272 lshift(t->t_dcom, 1); in execute()
278 else if (eq(t->t_dcom[0], STRver)) in execute()
279 if (t->t_dcom[1] && t->t_dcom[2]) { in execute()
281 t->t_systype = getv(t->t_dcom[1]); in execute()
282 lshift(t->t_dcom, 2); in execute()
283 t->t_dflg |= F_VER; in execute()
292 if (t->t_dtyp == NODE_COMMAND) { in execute()
296 bifunc = isbfunc(t); in execute()
337 if (t->t_dtyp == NODE_COMMAND && !bifunc && !noexec && intty && isoutatty) { in execute()
338 Char *cmd = unparse(t); in execute()
357 if (t->t_dflg & F_PIPEIN) in execute()
358 t->t_dflg &= ~(F_NOFORK); in execute()
367 if (bifunc && (t->t_dflg & F_PIPEIN)) in execute()
368 t->t_dflg &= ~(F_NOFORK); in execute()
377 t->t_dflg &= ~(F_NICE); in execute()
379 if (((t->t_dflg & F_TIME) || ((t->t_dflg & F_NOFORK) == 0 && in execute()
380 (!bifunc || t->t_dflg & in execute()
385 (bifunc && (t->t_dflg & F_PIPEIN) != 0 && in execute()
388 if (t->t_dtyp == NODE_PAREN || in execute()
389 t->t_dflg & (F_REPEAT | F_AMPERSAND) || bifunc) in execute()
405 pid = pfork(t, wanttty); in execute()
410 else if (pid != 0 && (t->t_dflg & F_AMPERSAND)) in execute()
517 palloc(pid, t); in execute()
530 ignint = (tpgrp == -1 && (t->t_dflg & F_NOINTERRUPT)) in execute()
563 (t->t_dflg & F_NOINTERRUPT)) { in execute()
570 if (t->t_dflg & F_NOHUP) in execute()
572 if (t->t_dflg & F_HUP) in execute()
574 if (t->t_dflg & F_NICE) { in execute()
575 int nval = SIGN_EXTEND_CHAR(t->t_nice); in execute()
585 if (t->t_dflg & F_VER) { in execute()
586 tsetenv(STRSYSTYPE, t->t_systype ? STRbsd43 : STRsys53); in execute()
603 if (didfds == 0 && t->t_dflg & F_PIPEOUT) { in execute()
607 if ((t->t_dflg & F_PIPEIN) != 0) in execute()
610 if (didfds == 0 && t->t_dflg & F_PIPEIN) { in execute()
614 if ((t->t_dflg & F_PIPEOUT) != 0) in execute()
622 if ((t->t_dflg & F_AMPERSAND) == 0) in execute()
627 doio(t, pipein, pipeout); in execute()
629 if (t->t_dflg & F_PIPEIN) { in execute()
634 if (t->t_dflg & F_PIPEOUT) { in execute()
645 func(t, bifunc); in execute()
653 func(t, bifunc); in execute()
665 if (t->t_dtyp != NODE_PAREN) { in execute()
666 doexec(t, do_glob); in execute()
693 t->t_dspr->t_dflg |= t->t_dflg & (F_NOINTERRUPT | F_BACKQ); in execute()
694 execute(t->t_dspr, wanttty, NULL, NULL, do_glob); in execute()
699 t->t_dcdr->t_dflg |= F_PIPEIN | (t->t_dflg & in execute()
701 execute(t->t_dcdr, wanttty, pv, pipeout, do_glob); in execute()
702 t->t_dcar->t_dflg |= F_PIPEOUT | (t->t_dflg & in execute()
704 execute(t->t_dcar, wanttty, pipein, pv, do_glob); in execute()
706 t->t_dcar->t_dflg |= F_PIPEOUT | (t->t_dflg & in execute()
708 execute(t->t_dcar, wanttty, pipein, pv, do_glob); in execute()
709 t->t_dcdr->t_dflg |= F_PIPEIN | (t->t_dflg & in execute()
711 execute(t->t_dcdr, wanttty, pv, pipeout, do_glob); in execute()
716 if (t->t_dcar) { in execute()
717 t->t_dcar->t_dflg |= t->t_dflg & (F_NOINTERRUPT | F_BACKQ); in execute()
718 execute(t->t_dcar, wanttty, NULL, NULL, do_glob); in execute()
722 if (t->t_dcar->t_dflg & F_AMPERSAND && t->t_dcdr && in execute()
723 (t->t_dcdr->t_dflg & F_AMPERSAND) == 0) in execute()
726 if (t->t_dcdr) { in execute()
727 t->t_dcdr->t_dflg |= t->t_dflg & in execute()
729 execute(t->t_dcdr, wanttty, NULL, NULL, do_glob); in execute()
735 if (t->t_dcar) { in execute()
736 t->t_dcar->t_dflg |= t->t_dflg & (F_NOINTERRUPT | F_BACKQ); in execute()
737 execute(t->t_dcar, wanttty, NULL, NULL, do_glob); in execute()
739 (t->t_dtyp == NODE_AND)) { in execute()
743 if (t->t_dcdr) { in execute()
744 t->t_dcdr->t_dflg |= t->t_dflg & in execute()
746 execute(t->t_dcdr, wanttty, NULL, NULL, do_glob); in execute()
760 if (didfds && !(t->t_dflg & F_REPEAT)) in execute()
791 splicepipe(struct command *t, Char *cp) in splicepipe() argument
811 Char **av = blkspl(t->t_dcom, &pv[1]); in splicepipe()
812 xfree(t->t_dcom); in splicepipe()
813 t->t_dcom = av; in splicepipe()
836 doio(struct command *t, int *pipein, int *pipeout) in doio() argument
840 unsigned long flags = t->t_dflg; in doio()
845 if (t->t_dlef) { in doio()
854 cp = splicepipe(t, t->t_dlef); in doio()
891 if (t->t_drit) { in doio()
894 cp = splicepipe(t, t->t_drit); in doio()