> Shall I commit?

Well, it works well only for good C extensions and programs
which avoids NFS or slow HDD in the main thread.

However, handling SIGCHLD in timer-thread will have the
advantage of working well even when main thread is stuck in
an uninterruptible state.

So maybe I will retry moving waitpid to work in timer-thread as
I mentioned [ruby-core:87621].  That will allow waitpid to
function in sub-Threads if the main thread is stuck in 'D'
state.  The race conditions with timer-thread can be avoided
with futex in Linux and pipe on other OSes.  Or maybe use
interrupt_lock like native_sleep for thread_pthread.c

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>