mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Retry ps if it doesn't do setproctitle
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7f7621e734
commit
0358381472
1 changed files with 6 additions and 2 deletions
|
@ -466,8 +466,12 @@ class TestRubyOptions < Test::Unit::TestCase
|
|||
write_file("test-script", "$0 = 'hello world'; sleep 60")
|
||||
|
||||
pid = spawn(EnvUtil.rubybin, "test-script")
|
||||
sleep 0.1
|
||||
ps = `ps -p #{pid} -o command`
|
||||
ps = nil
|
||||
10.times do
|
||||
sleep 0.1
|
||||
ps = `ps -p #{pid} -o command`
|
||||
break if /hello world/ =~ ps
|
||||
end
|
||||
assert_match(/hello world/, ps)
|
||||
Process.kill :KILL, pid
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue