From: Roger Pack Date: 2009-06-24T04:17:54+09:00 Subject: Re: Threads + Forks in Ruby 1.9.1p129 > On 1.8.6 with green threads a fork() could result in a child process > with all the threads present in the parent process, however I know > that with the Apple default install of 1.8.6 on Leopard this is not > the case. As I don't have the time to dig into the sources right now > I'll float the hypothesis that 1.8.6 is being built with pthreads. running this code: Thread.new { puts 'hello'; loop { sleep 1; puts 'in 1' + Process.pid.to_s} } fork { puts 'child' + Process.pid.to_s sleep } puts 'parent' + Process.pid.to_s sleep on ruby 1.8.7 [linux, no pthreads] results in only the parent running the thread, and also 1.9.2 does the same. For what it's worth it seems that threads really don't run in child processes. -=r -- Posted via http://www.ruby-forum.com/.