Yes, I saw that but for some reason if you kill it that code will never be invoked and hence the children will become zombies.
//M On 25 Dec 2017, at 22:13 , Denys Vlasenko <[email protected]> wrote: > 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; > } > } > } //Markus - The panama-hat hacker
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
