5 extern char *Signame[];
8 register struct var *trapreq;
9 register struct word *starval;
10 starval=vlook("*")->val;
11 while(ntrap) for(i=0;i!=NSIG;i++) while(trap[i]){
14 if(getpid()!=mypid) Exit(getstatus());
15 trapreq=vlook(Signame[i]);
17 start(trapreq->fn, trapreq->pc, (struct var *)0);
18 runq->local=newvar(strdup("*"), runq->local);
19 runq->local->val=copywords(starval, (struct word *)0);
20 runq->local->changed=1;
21 runq->redir=runq->startredir=0;
23 else if(i==SIGINT || i==SIGQUIT){
25 * run the stack down until we uncover the
26 * command reading loop. Xreturn will exit
27 * if there is none (i.e. if this is not
30 while(!runq->iflag) Xreturn();
32 else Exit(getstatus());