summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-26 16:22:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-26 16:22:56 +0000
commit01fb7e5b71db72522ba26fde0c2f7fd2d194077f (patch)
treef228c9c72b0a6e7dd17adcf025900bb520d9f98d /test
parentbd9039e24f05ad9ac79216d4b4d77b1879acebb9 (diff)
dtrace: wait command
* test/dtrace/helper.rb (DTrace::TestCase::READ_PROBES): wait the spawned command not to make a waiter thread. fix up r55736. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/dtrace/helper.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/dtrace/helper.rb b/test/dtrace/helper.rb
index 1417185537..539cce9d6f 100644
--- a/test/dtrace/helper.rb
+++ b/test/dtrace/helper.rb
@@ -31,9 +31,12 @@ module DTrace
DTRACE_CMD = %w[dtrace -b 8m]
when /darwin/i
READ_PROBES = proc do |cmd|
- PTY.spawn(*cmd) do |io, _|
- break io.readlines.each {|line| line.sub!(/\r$/, "")}
+ lines = nil
+ PTY.spawn(*cmd) do |io, _, pid|
+ lines = io.readlines.each {|line| line.sub!(/\r$/, "")}
+ Process.wait(pid)
end
+ lines
end
end