* 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:
nobu 2018-05-31 07:10:39 +00:00
Родитель 83b14c26aa
Коммит a6273888a3
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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)