зеркало из https://github.com/github/ruby.git
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:
Родитель
bd9039e24f
Коммит
01fb7e5b71
|
@ -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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче