mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
bd9039e24f
commit
01fb7e5b71
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue