search for: prev_job

Displaying 4 results from an estimated 4 matches for "prev_job".

2020 Mar 28
0
[klibc:update-dash] dash: jobs: Only clear gotsigchld when waiting for everything
...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_WAITCMD, 0) <= 0) + if (!dowait(DOWAIT_WAITCMD, 0)) goto sigout; } } @@ -635,9 +632,8 @@ start:...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add vfork support
...truct job *jp, union node *n, int mode) } } if (!oldlvl && iflag) { - setsignal(SIGINT); - setsignal(SIGQUIT); + if (mode != FORK_BG) { + setsignal(SIGINT); + setsignal(SIGQUIT); + } setsignal(SIGTERM); } + + if (lvforked) + return; + for (jp = curjob; jp; jp = jp->prev_job) freejob(jp); } -STATIC inline void -forkparent(struct job *jp, union node *n, int mode, pid_t pid) +static void forkparent(struct job *jp, union node *n, int mode, pid_t pid) { + if (pid < 0) { + TRACE(("Fork failed, errno=%d", errno)); + if (jp) + freejob(jp); + sh_error(...
2019 Jan 25
0
[klibc:update-dash] jobs: Handle string-based job descriptors
.../dash/jobs.c index 7c324b76..5e080f6a 100644 --- a/usr/dash/jobs.c +++ b/usr/dash/jobs.c @@ -713,9 +713,7 @@ check: } found = 0; - while (1) { - if (!jp) - goto err; + while (jp) { if (match(jp->ps[0].cmd, p)) { if (found) goto err; @@ -725,6 +723,10 @@ check: jp = jp->prev_job; } + if (!found) + goto err; + jp = found; + gotit: #if JOBS err_msg = "job %s not created under job control";
2020 Mar 28
0
[klibc:update-dash] dash: jobs: Handle string-based job descriptors
.../dash/jobs.c index 49c14441..c1f9688f 100644 --- a/usr/dash/jobs.c +++ b/usr/dash/jobs.c @@ -713,9 +713,7 @@ check: } found = 0; - while (1) { - if (!jp) - goto err; + while (jp) { if (match(jp->ps[0].cmd, p)) { if (found) goto err; @@ -725,6 +723,10 @@ check: jp = jp->prev_job; } + if (!found) + goto err; + jp = found; + gotit: #if JOBS err_msg = "job %s not created under job control";