Lines Matching defs:px
248 struct process *px;
315 px = 0;
324 px=job_byjid(pw->p_job);
327 if(px)
330 job_unlink(px);
331 px->p_nxtjob = job.pwlist;
332 job.pwlist = px;
411 if(px && pw != px)
415 px = job_byjid((int)pw->p_job);
416 for(; px && (px->p_flag&P_DONE); px=px->p_nxtproc);
417 if(!px)
768 register struct process *px;
777 for(;pw;pw=px)
779 px = pw->p_nxtjob;
845 register struct process *px = pw;
853 if((flag&JOB_NFLAG) && (!(px->p_flag&P_NOTIFY)||px->p_pgrp==0))
857 sfprintf(outfile,"%d\n",px->p_pgrp?px->p_pgrp:px->p_pid);
860 if((px->p_flag&P_DONE) && job.waitall && !(flag&JOB_LFLAG))
863 n = px->p_job;
864 if(px==job.pwlist)
866 else if(px==job.pwlist->p_nxtjob)
877 sfprintf(outfile,"%d\t",px->p_pid);
878 if(px->p_flag&P_SIGNALLED)
879 msg = job_sigmsg((int)(px->p_exit));
880 else if(px->p_flag&P_NOTIFY)
883 n = px->p_exit;
887 px->p_flag &= ~P_NOTIFY;
895 if(px->p_flag&P_COREDUMP)
903 px = px->p_nxtproc;
906 while(px=px->p_nxtproc)
907 px->p_flag &= ~P_NOTIFY;
908 px = 0;
910 if(!px)
915 while(px);
1085 register struct process *pw, *px;
1093 while(px=pw)
1096 free((void*)px);
1244 register struct process *pw, *px;
1246 for(px=pw; px; px=px->p_nxtproc)
1248 if(px->p_pid==pid)
1249 return(px);
1300 register struct process *pw=0,*px;
1354 for(px=job.pwlist;px; px = px->p_nxtjob)
1356 if(px!=pw && (px->p_flag&P_NOTIFY))
1361 job_list(px,JOB_NFLAG|JOB_NLFLAG);
1364 else if(!sh_isoption(SH_INTERACTIVE) && (px->p_flag&P_SIGNALLED))
1366 job_prmsg(px);
1367 px->p_flag &= ~P_NOTIFY;
1400 px = job_byjid(jobid);
1405 for(;px;px=px->p_nxtproc)
1407 if(px->p_exit)
1410 if(!px)
1411 px = pw;
1413 else if(px!=pw)
1414 px = 0;
1415 if(px)
1417 sh.exitval=px->p_exit;
1418 if(px->p_flag&P_SIGNALLED)
1421 px->p_flag &= ~P_EXITSAVE;
1424 px = job_unpost(pw,1);
1425 if(!px || !sh_isoption(SH_PIPEFAIL) || !job.waitall)
1427 pw = px;
1478 for(pw=job.pwlist; pw; pw=px)
1480 px = pw->p_nxtjob;
1568 static void job_unstop(register struct process *px)
1572 for(pw=px ;pw ;pw=pw->p_nxtproc)
1582 if(px->p_fgrp != px->p_pgrp)
1583 killpg(px->p_fgrp,SIGCONT);
1584 killpg(px->p_pgrp,SIGCONT);
1649 register struct process *px;
1656 for(px=job.pwlist;px;px=px->p_nxtjob)
1657 if(px->p_nxtjob == pw)
1659 px->p_nxtjob = pw->p_nxtjob;
1795 register struct process *pw, *px, *pwnext;
1815 for(px=pw; px; px=px->p_nxtproc)
1816 px->p_flag |= P_DONE;