summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
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 1417185537a..539cce9d6f3 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