Displaying 3 results from an estimated 3 matches for "dowait_norm".
Did you mean:
dowait_normal
2020 Mar 28
0
[klibc:update-dash] dash: jobs: Only clear gotsigchld when waiting for everything
...tic int jobless;
STATIC void set_curjob(struct job *, unsigned);
STATIC int jobno(const struct job *);
@@ -555,8 +553,7 @@ showjobs(struct output *out, int mode)
TRACE(("showjobs(%x) called\n", mode));
/* If not even one one job changed, there is nothing to do */
- while (dowait(DOWAIT_NORMAL, NULL) > 0)
- continue;
+ dowait(DOWAIT_NORMAL, NULL);
for (jp = curjob; jp; jp = jp->prev_job) {
if (!(mode & SHOW_CHANGED) || jp->changed)
@@ -613,7 +610,7 @@ waitcmd(int argc, char **argv)
jp->waited = 1;
jp = jp->prev_job;
}
- if (dowait(DOWAIT_WAITC...
2019 Jan 25
0
[klibc:update-dash] jobs - Do not block when waiting on SIGCHLD
...7 @@ waitforjob(struct job *jp)
int st;
TRACE(("waitforjob(%%%d) called\n", jp ? jobno(jp) : 0));
- while ((jp && jp->state == JOBRUNNING) || gotsigchld)
- dowait(DOWAIT_BLOCK, jp);
- if (!jp)
+ if (!jp) {
+ int pid = gotsigchld;
+
+ while (pid > 0)
+ pid = dowait(DOWAIT_NORMAL, NULL);
+
return exitstatus;
+ }
+
+ while (jp->state == JOBRUNNING)
+ dowait(DOWAIT_BLOCK, jp);
st = getstatus(jp);
#if JOBS
if (jp->jobctl) {
2020 Mar 28
0
[klibc:update-dash] dash: jobs - Do not block when waiting on SIGCHLD
...7 @@ waitforjob(struct job *jp)
int st;
TRACE(("waitforjob(%%%d) called\n", jp ? jobno(jp) : 0));
- while ((jp && jp->state == JOBRUNNING) || gotsigchld)
- dowait(DOWAIT_BLOCK, jp);
- if (!jp)
+ if (!jp) {
+ int pid = gotsigchld;
+
+ while (pid > 0)
+ pid = dowait(DOWAIT_NORMAL, NULL);
+
return exitstatus;
+ }
+
+ while (jp->state == JOBRUNNING)
+ dowait(DOWAIT_BLOCK, jp);
st = getstatus(jp);
#if JOBS
if (jp->jobctl) {