On Fri, Dec 22, 2017 at 9:48 PM, Markus Gothe <[email protected]> wrote:
> What is the rationale behind not reaping the children when the program
> exists? i run it from inittab as a respawn process and I get zombies when
> killing it when not reaping children alas the fix was pretty simple.
runsvdir does read any children:
for (;;) {
unsigned now;
unsigned sig;
/* collect children */
for (;;) {
pid_t pid = wait_any_nohang(NULL);
if (pid <= 0)
break;
for (i = 0; i < svnum; i++) {
if (pid == sv[i].pid) {
/* runsv has died */
sv[i].pid = 0;
need_rescan = 1;
}
}
}
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox