зеркало из https://github.com/github/ruby.git
fix the condition
* test/ruby/test_rubyoptions.rb: Process.wait with WNOHANG returns nil while the target process is alive. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
83b14c26aa
Коммит
a6273888a3
|
@ -594,7 +594,7 @@ class TestRubyOptions < Test::Unit::TestCase
|
|||
sleep 0.1
|
||||
ps = `#{PSCMD.join(' ')} #{pid}`
|
||||
break if /hello world/ =~ ps
|
||||
end while Process.wait(pid, Process::WNOHANG)
|
||||
end until Process.wait(pid, Process::WNOHANG)
|
||||
assert_match(/hello world/, ps)
|
||||
Process.kill :KILL, pid
|
||||
Process.wait(pid)
|
||||
|
@ -620,7 +620,7 @@ class TestRubyOptions < Test::Unit::TestCase
|
|||
sleep 0.1
|
||||
ps = `#{PSCMD.join(' ')} #{pid}`
|
||||
break if /hello world/ =~ ps
|
||||
end while Process.wait(pid, Process::WNOHANG)
|
||||
end until Process.wait(pid, Process::WNOHANG)
|
||||
assert_match(/hello world/, ps)
|
||||
Process.kill :KILL, pid
|
||||
Process.wait(pid)
|
||||
|
|
Загрузка…
Ссылка в новой задаче