Brian Fundakowski Feldman <green / FreeBSD.org> writes:

> If your system uses the rb_waitpid() codepath of rb_f_wait(),
> Process.wait will return prematurely if you have multiple child
> processes.  The problem is that rb_waitpid() is called only once,
> when it needs to be called until a you get an ECHILD error from
> rb_waitpid().

Perhaps it's late and I should waiting until morning before posting,
but...

I'm not sure I see the problem. Process.wait waits for _a_ child to
terminate, not all children. Your patch seems to reap them all.


Regards


Dave