Displaying 2 results from an estimated 2 matches for "forkpar".
Did you mean:
forkcdr
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add vfork support
...f (!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("Cannot fork");
+ /* NOTREACHED */
+ }
+...
2020 Mar 28
0
[klibc:update-dash] dash: jobs: Only clear gotsigchld when waiting for everything
...gout;
+ if (!dowait(DOWAIT_WAITCMD, job))
+ goto sigout;
job->waited = 1;
retval = getstatus(job);
repeat:
@@ -889,18 +885,14 @@ forkchild(struct job *jp, union node *n, int mode)
}
for (jp = curjob; jp; jp = jp->prev_job)
freejob(jp);
- jobless = 0;
}
STATIC inline void
forkparent(struct job *jp, union node *n, int mode, pid_t pid)
{
TRACE(("In parent shell: child = %d\n", pid));
- if (!jp) {
- while (jobless && dowait(DOWAIT_NORMAL, 0) > 0);
- jobless++;
+ if (!jp)
return;
- }
#if JOBS
if (mode != FORK_NOJOB && jp->jobctl) {...