Eric Wong <normalperson / yhbt.net> wrote:
> In case there are C extensions or FFI wrappers that fork() directly
> without using Ruby, I prefer pthread_atfork() to close the pipe:

I just pushed a few more fixes up to my git branch, all
view/downloadable here:

  http://bogomips.org/ruby.git/log/?h=sleepy-timer-thread

  "make test" works, waiting on "test-all" but I'm gone for a while

commit a73bfa86f43cef5c4d4d08e5dff494a9eb7c77ab
Author: Eric Wong <normalperson / yhbt.net>
Date:   Sat Jun 18 04:16:08 2011 +0000

    thread_pthread: set close-on-exec for timer thread pipe
    
    In case any C extensions call exec*() directly...

commit fc3928585073b8bce44544e74b1bda5097e28833
Author: Eric Wong <normalperson / yhbt.net>
Date:   Sat Jun 18 04:13:48 2011 +0000

    thread_pthread.c: show errno for pipe() failure
    
    pipe() stores the error in errno, not as a return value

commit f4becc86ecd462e76ce34a35787ec2fc2ae7ebb4
Author: Eric Wong <normalperson / yhbt.net>
Date:   Sat Jun 18 04:12:52 2011 +0000

    thread_pthread: still need to close pipe when resetting
    
    otherwise plain exec* family calls will keep the pipe around.
-- 
Eric Wong