1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

don't sleep indefinitely. collect the zombie.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-05-07 15:07:11 +00:00
parent 9283449812
commit 0365096bfe

View file

@ -47,16 +47,19 @@ class TestWEBrickServer < Test::Unit::TestCase
def test_daemon
begin
r, w = IO.pipe
Process.fork{
pid1 = Process.fork{
r.close
WEBrick::Daemon.start
w.puts(Process.pid)
sleep
sleep 10
}
assert(Process.kill(:KILL, r.gets.to_i))
pid2 = r.gets.to_i
assert(Process.kill(:KILL, pid2))
assert_not_equal(pid1, pid2)
rescue NotImplementedError
# snip this test
ensure
Process.wait(pid1) if pid1
r.close
w.close
end