diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-10 03:46:08 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-10 03:46:08 +0000 |
commit | ae76a2323e062869f9235c7a23627d427127a9f2 (patch) | |
tree | 289bc273f4ec2e4d5ce82a701700f20375fea883 /test/webrick | |
parent | e5dc8988af97526c5831bd347358ad2795a0834e (diff) |
* 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
Diffstat (limited to 'test/webrick')
-rw-r--r-- | test/webrick/test_server.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/test/webrick/test_server.rb b/test/webrick/test_server.rb index 4c064fdb4b..eab7a5ca5f 100644 --- a/test/webrick/test_server.rb +++ b/test/webrick/test_server.rb @@ -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 |