Lines Matching defs:subshell

58 static struct subshell
61 struct subshell *prev; /* previous subshell data */
62 struct subshell *pipe; /* subshell where output goes to pipe on fork */
63 Dt_t *var; /* variable table at time of subshell */
65 Dt_t *sfun; /* function scope for subshell */
66 Dt_t *salias;/* alias scope for subshell */
106 register struct subshell *sp = subshell_data->pipe;
183 * This routine creates a temp file if necessary and creates a subshell.
189 register struct subshell *sp = subshell_data;
213 /* setting subpid to 1 causes subshell to exit when reached */
219 shp->subshell = 0;
228 register struct subshell *sp;
230 for(sp = (struct subshell*)subshell_data; sp; sp=sp->prev)
250 register struct subshell *sp = (struct subshell*)subshell_data;
267 if(mp || !np->nvfun || np->nvfun->subshell>=sh.subshell)
311 save = shp->subshell;
312 shp->subshell = 0;
315 shp->subshell = save;
322 static void nv_restore(struct subshell *sp)
381 * create new one if in a subshell and one doesn't exist and create is non-zero
385 register struct subshell *sp = subshell_data;
399 * create new one if in a subshell and one doesn't exist and create is non-zero
403 register struct subshell *sp = subshell_data;
436 register struct subshell *sp = subshell_data;
448 register struct subshell *sp = subshell_data;
472 struct subshell sub_data;
473 register struct subshell *sp = &sub_data;
477 int16_t subshell;
495 subshell = shp->subshell+1;
496 SH_SUBSHELLNOD->nvalue.s = subshell;
497 shp->subshell = subshell;
575 if(comsub!=2 && jmpval!=SH_JMPSUB && shp->st.trapcom[0] && shp->subshell)
585 if(shp->subshell==0) /* must be child process */
721 if(shp->subshell)
722 SH_SUBSHELLNOD->nvalue.s = --shp->subshell;
723 subshell = shp->subshell;