mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
83b14c26aa
commit
a6273888a3
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue