summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_io.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index c37d14c47f..11ef5252e6 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -3178,4 +3178,18 @@ End
assert_raise(IOError) { io.close }
end
+ def test_open_fifo_does_not_block_other_threads
+ mkcdtmpdir {
+ assert(system("mkfifo", "fifo"), "mkfifo fails")
+ assert_separately([], <<-'EOS')
+ t = Thread.new {
+ open("fifo") {}
+ }
+ sleep 0.1 until t.status == "sleep"
+ sleep 0.1
+ assert(true)
+ EOS
+ }
+ end if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM
+
end