summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-10 03:46:08 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-10 03:46:08 +0000
commitfc6cbaffad4dbeae37bd89e52fb1223131c7cd57 (patch)
tree289bc273f4ec2e4d5ce82a701700f20375fea883 /test
parent6ea60d53a4e3d5c4443ceb92dff506d613e3c4ef (diff)
downloadruby-fc6cbaffad4dbeae37bd89e52fb1223131c7cd57.tar.gz
ruby-fc6cbaffad4dbeae37bd89e52fb1223131c7cd57.tar.xz
ruby-fc6cbaffad4dbeae37bd89e52fb1223131c7cd57.zip
* test/webrick/test_server.rb (test_daemon): simply use fork's return
value, don't use pipe. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/webrick/test_server.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/test/webrick/test_server.rb b/test/webrick/test_server.rb
index 4c064fdb4..eab7a5ca5 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