[PATCH] Fix runsvdir so it reaps children and avoid zombi processes when killed.

Michael Conrad mconrad at intellitree.com
Tue Jan 9 19:33:38 UTC 2018


On 1/9/2018 1:53 PM, Laurent Bercot wrote:
>
>> Zombies will _always_ be observable, even if you try to reap 
>> immediately.
>
>  Of course. I used "observable" in the broad sense, meaning there is a
> nonzero amount of time where init is not runnable, won't be scheduled,
> and won't immediately reap zombies. This makes zombie observation
> literally millions of times more likely than when there's no blocking
> path between the moment it gets a SIGCHLD and the moment it reaps the
> zombie. :) 

But then there's the age-old question of whether you should make edge 
cases more rare so that they almost never happen, or more frequent so 
that people can catch their mistakes.

Some years ago, I had a co-worker who was testing our code (C++) on BSD 
while I was testing on Linux, and he would constantly find my 
un-initialized attribute bugs, because Linux was zeroing every object 
allocation (probably just the underlying pages from mmap), but BSD 
wasn't.  I'm sure the Linux behavior saves people from a lot of random 
crashes, making development easier, but it leaves the bugs out there in 
the wild to be run into later.

-Mike


More information about the busybox mailing list