aboutsummaryrefslogtreecommitdiffstats
path: root/test/dtrace
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
commit03e33a23ffeae8c6345e3fb367b9de000b3535d0 (patch)
treef228c9c72b0a6e7dd17adcf025900bb520d9f98d /test/dtrace
parent757f36366964804db7906953bfd0c3668e8423c1 (diff)
downloadruby-03e33a23ffeae8c6345e3fb367b9de000b3535d0.tar.gz
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/dtrace')
-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