aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_process.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-31 15:31:46 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-31 15:31:46 +0000
commit6f6dd30dbf3a1e77c643bb7e1391ed28e59f4dc7 (patch)
tree6af3ed96b10a908289a8c5ce4f5f14fa7fd89a89 /test/ruby/test_process.rb
parent06fb82343528ea1e479d10d97946862d8a3dff61 (diff)
downloadruby-6f6dd30dbf3a1e77c643bb7e1391ed28e59f4dc7.tar.gz
Join threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_process.rb')
-rw-r--r--test/ruby/test_process.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 75657ab894..ccd5676171 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -1237,8 +1237,9 @@ class TestProcess < Test::Unit::TestCase
IO.pipe do |r, w|
pid = spawn(RUBY, "foo", out: w)
w.close
- Thread.new { r.read(1); Process.kill(:SIGQUIT, pid) }
+ th = Thread.new { r.read(1); Process.kill(:SIGQUIT, pid) }
Process.wait(pid)
+ th.join
end
t = Time.now
s = $?