diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/dtrace/helper.rb | 7 |
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 |