Lines Matching refs:px

341 	struct process *px;
449 px = 0;
458 px=job_byjid(pw->p_job);
467 if(px)
470 job_unlink(px);
471 px->p_nxtjob = job.pwlist;
472 job.pwlist = px;
545 if(px && pw != px)
549 px = job_byjid((int)pw->p_job);
550 for(; px && (px->p_flag&P_DONE); px=px->p_nxtproc);
551 if(!px)
913 register struct process *px;
925 for(;pw;pw=px)
927 px = pw->p_nxtjob;
998 register struct process *px = pw;
1006 if((flag&JOB_NFLAG) && (!(px->p_flag&P_NOTIFY)||px->p_pgrp==0))
1011 sfprintf(outfile,"%s\n",sh_pid2str(shp,px->p_pgrp?px->p_pgrp:px->p_pid));
1013 sfprintf(outfile,"%d\n",px->p_pgrp?px->p_pgrp:px->p_pid);
1017 if((px->p_flag&P_DONE) && job.waitall && !(flag&JOB_LFLAG))
1020 n = px->p_job;
1021 if(px==job.pwlist)
1023 else if(px==job.pwlist->p_nxtjob)
1035 sfprintf(outfile,"%s\t",sh_pid2str(shp,px->p_pid));
1037 sfprintf(outfile,"%d\t",px->p_pid);
1039 if(px->p_flag&P_SIGNALLED)
1040 msg = job_sigmsg((int)(px->p_exit));
1041 else if(px->p_flag&P_NOTIFY)
1044 n = px->p_exit;
1048 px->p_flag &= ~P_NOTIFY;
1056 if(px->p_flag&P_COREDUMP)
1064 px = px->p_nxtproc;
1067 while(px=px->p_nxtproc)
1068 px->p_flag &= ~P_NOTIFY;
1069 px = 0;
1071 if(!px)
1076 while(px);
1253 register struct process *pw, *px;
1261 while(px=pw)
1264 free((void*)px);
1431 register struct process *pw, *px;
1433 for(px=pw; px; px=px->p_nxtproc)
1435 if(px->p_pid==pid)
1436 return(px);
1488 register struct process *pw=0,*px;
1552 for(px=job.pwlist;px; px = px->p_nxtjob)
1554 if(px!=pw && (px->p_flag&P_NOTIFY))
1559 job_list(px,JOB_NFLAG|JOB_NLFLAG);
1562 else if(!sh_isoption(SH_INTERACTIVE) && (px->p_flag&P_SIGNALLED))
1564 job_prmsg(px);
1565 px->p_flag &= ~P_NOTIFY;
1598 px = job_byjid(jobid);
1600 if(px!=pw)
1601 px = 0;
1602 if(px)
1604 shp->exitval=px->p_exit;
1605 if(px->p_flag&P_SIGNALLED)
1608 px->p_flag &= ~P_EXITSAVE;
1611 px = job_unpost(pw,1);
1612 if(!px || !job.waitall)
1614 pw = px;
1669 for(pw=job.pwlist; pw; pw=px)
1671 px = pw->p_nxtjob;
1759 static void job_unstop(register struct process *px)
1763 for(pw=px ;pw ;pw=pw->p_nxtproc)
1773 if(px->p_fgrp != px->p_pgrp)
1774 killpg(px->p_fgrp,SIGCONT);
1775 killpg(px->p_pgrp,SIGCONT);
1844 register struct process *px;
1851 for(px=job.pwlist;px;px=px->p_nxtjob)
1852 if(px->p_nxtjob == pw)
1854 px->p_nxtjob = pw->p_nxtjob;
2000 register struct process *pw, *px, *pwnext;
2021 for(px=pw; px; px=px->p_nxtproc)
2022 px->p_flag |= P_DONE;