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

* test/webrick/test_server.rb (test_daemon): simply use fork's return

value, don't use pipe.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2009-12-10 03:46:08 +00:00
parent e5dc8988af
commit ae76a2323e

View file

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