summaryrefslogtreecommitdiff
path: root/test/ruby/test_process.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_process.rb')
-rw-r--r--test/ruby/test_process.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index e2f82dde5e..edfb8ebe0e 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -1732,15 +1732,20 @@ class TestProcess < Test::Unit::TestCase
sig_w.write('?')
end
pid = nil
+ th = nil
IO.pipe do |r, w|
pid = fork { r.read(1); exit }
- Thread.start {
+ th = Thread.start {
Thread.current.report_on_exception = false
raise
}
w.puts
end
Process.wait pid
+ begin
+ th.join
+ rescue Exception
+ end
assert_send [sig_r, :wait_readable, 5], 'self-pipe not readable'
end
if defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? # checking -DRJIT_FORCE_ENABLE. It may trigger extra SIGCHLD.