From: "drbrain (Eric Hodel)" Date: 2013-02-22T06:03:48+09:00 Subject: [ruby-core:52634] [Ruby 1.8 - Bug #7908][Rejected] Blocking IO.open stops Thread.new from returning. Issue #7908 has been updated by drbrain (Eric Hodel). Status changed from Open to Rejected Ruby 1.8.7 has reached its end-of-life for bug fixes so we must reject this ticket: http://www.ruby-lang.org/en/news/2011/10/06/plans-for-1-8-7/ The end-of-life for security fixes is quickly approaching (June), so we recommend you upgrade to ruby 1.9 or the upcoming 2.0. ---------------------------------------- Bug #7908: Blocking IO.open stops Thread.new from returning. https://bugs.ruby-lang.org/issues/7908#change-36717 Author: jamesotron (James Harton) Status: Rejected Priority: Normal Assignee: Category: core Target version: Ruby 1.8.7 ruby -v: ruby 1.8.7 (2012-10-12 patchlevel 371) [i686-darwin12.2.1] When calling File.open on a FIFO the open will block until both ends of the FIFO are open. When creating a new thread to handle this blocking on Ruby 1.8.7 we discover that Thread.new never returns, consider: require 'tempfile' t = Tempfile.new('fifo') fifo = t.path t.close ; t.unlink `mkfifo #{fifo}` Thread.new { File.open(fifo, 'r') } puts "Never arrived here :(" I have tested on Ruby 1.8.7p371 on OSX and 1.8.7p352 on Linux. Interestingly on Linux it seems to eat CPU while it's waiting, whereas on OSX the process is idle. Relevant ruby -v output: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] ruby 1.8.7 (2012-10-12 patchlevel 371) [i686-darwin12.2.1] -- http://bugs.ruby-lang.org/