search for: freejob

Displaying 3 results from an estimated 3 matches for "freejob".

Did you mean: freejo
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add vfork support
..., 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("Cannot...
2003 Aug 14
4
bin/55346: /bin/sh eats memory and CPU infinitely
Hi! It seems /bin/sh in 4.8-STABLE has problem with SIGCHLD processing. In short, it often fails to process it correctly, zombies float around, jobs are not marked as finished in jobtab[] that fills memory and takes much CPU to be processed. Run this one-liner using /bin/sh and see hundreds of zombies: #!/bin/sh while :; do : & done A kernel will halt this as soon as it reaches limits and
2020 Mar 28
0
[klibc:update-dash] dash: jobs: Only clear gotsigchld when waiting for everything
...if (dowait(DOWAIT_WAITCMD, 0) <= 0) - goto sigout; + 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...