Lines Matching refs:job

98 struct job {  struct
111 struct job *next; /* job used after this one */ argument
116 static struct job *jobtab; /* array of jobs */
119 static struct job *bgjob = NULL; /* last background process */
121 static struct job *jobmru; /* most recently used job list */
132 static void restartjob(struct job *);
134 static void freejob(struct job *);
135 static int waitcmdloop(struct job *);
136 static struct job *getjob_nonotfound(const char *);
137 static struct job *getjob(const char *);
139 static pid_t dowait(int, struct job *);
144 static void setcurjob(struct job *);
145 static void deljob(struct job *);
146 static struct job *getcurjob(struct job *);
148 static int getjobstatus(const struct job *);
149 static void printjobcmd(struct job *);
150 static void showjob(struct job *, int);
261 struct job *jp; in fgcmd()
286 struct job *jp; in bgcmd()
305 restartjob(struct job *jp) in restartjob()
356 static int getjobstatus(const struct job *jp) in getjobstatus()
371 printjobcmd(struct job *jp) in printjobcmd()
385 showjob(struct job *jp, int mode) in showjob()
391 struct job *j; in showjob()
493 struct job *jp; in showjobs()
526 freejob(struct job *jp) in freejob()
552 struct job *job; in waitcmd() local
560 job = getjob_nonotfound(*argptr); in waitcmd()
561 if (job == NULL) in waitcmd()
564 retval = waitcmdloop(job); in waitcmd()
572 waitcmdloop(struct job *job) in waitcmdloop() argument
575 struct job *jp; in waitcmdloop()
583 if (job != NULL) { in waitcmdloop()
584 if (job->state == JOBDONE) { in waitcmdloop()
585 status = getjobstatus(job); in waitcmdloop()
590 if (! iflag || ! job->changed) in waitcmdloop()
591 freejob(job); in waitcmdloop()
593 job->remembered = 0; in waitcmdloop()
594 if (job == bgjob) in waitcmdloop()
618 } while (dowait(DOWAIT_BLOCK | DOWAIT_SIG, (struct job *)NULL) != -1); in waitcmdloop()
630 struct job *jp; in jobidcmd()
648 static struct job *
652 struct job *found, *jp; in getjob_nonotfound()
721 static struct job *
724 struct job *jp; in getjob()
736 struct job *jp; in killjob()
759 struct job *
763 struct job *jp; in makejob()
828 setcurjob(struct job *cj) in setcurjob()
830 struct job *jp, *prev; in setcurjob()
848 deljob(struct job *j) in deljob()
850 struct job *jp, *prev; in deljob()
867 static struct job *
868 getcurjob(struct job *nj) in getcurjob()
870 struct job *jp; in getcurjob()
902 forkshell(struct job *jp, union node *n, int mode) in forkshell()
920 struct job *p; in forkshell()
1016 vforkexecshell(struct job *jp, char **argv, char **envp, const char *path, int idx, int pip[2]) in vforkexecshell()
1086 waitforjob(struct job *jp, int *signaled) in waitforjob()
1146 dowait(int mode, struct job *job) in dowait() argument
1153 struct job *jp; in dowait()
1154 struct job *thisjob; in dowait()
1163 TRACE(("dowait(%d, %p) called\n", mode, job)); in dowait()
1200 if (pid == -1 && errno == ECHILD && job != NULL) in dowait()
1201 job->state = JOBDONE; in dowait()
1241 if (jp != job) { in dowait()
1257 else if ((!rootshell || !iflag || thisjob == job) && in dowait()
1278 TRACE(("Not printing status, rootshell=%d, job=%p\n", rootshell, job)); in dowait()
1294 struct job *jp; in stoppedjobs()