From: Lee Hinman Date: 2009-06-23T14:06:59+09:00 Subject: Threads + Forks in Ruby 1.9.1p129 Hey All, I'm seeing some weirdness trying to get Ara's forkoff gem working on ruby 1.9.1. Here's some code that duplicates the problem: #!/usr/bin/env ruby require 'thread' t1 = Thread.new do pid = fork unless pid sleep(1) exit end Process.waitpid(pid) end t2 = Thread.new do pid = fork unless pid sleep(1) exit end Process.waitpid(pid) end t1.join t2.join On Ruby 1.8.6, it runs for ~1.2 seconds, then exits. On Ruby 1.9.1, it runs and hangs forever and I'm left with zombie processes every time I run it. Can someone help me understand why this code hangs indefinitely please? Some kind of deadlock issue (similar to bug #1525) maybe? Full ruby version: ruby 1.9.1p129 (2009-05-12 revision 23412) [i386- darwin9.7.0] (on OSX 10.5) Thanks, Lee