Please point out the code in init.c which you think is buggy.
https://git.busybox.net/busybox/tree/init/init.c#n1216 is buggy. Unconditionally sleeping when signals may arrive is a no-no. If a child dies right before this line, or during the sleep, init will not handle the signal immediately. It will sleep the full second, and only handle the signal - and reap the zombie - after the sleep is done. This is not theoretical. I have personally hit the race window several times. On Alpine Linux, a test for some javascript package got confused because it was (erroneously) basing a timer on how long it took for a child to be reapt, and consistently hitting more than one second. The way to fix this is to completely redesign the loop. Currently it's a mess of two nested loops with several check_delayed_sigs() calls inside - no matter how many you have, it's still racy. The proper way to design the loop is to have a single loop, not a nested one, with either a self-pipe to handle signals, or a pselect()/ppoll() call with a signal mask. -- Laurent _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
