ruby-changes:14235
From: naruse <ko1@a...>
Date: Thu, 10 Dec 2009 12:46:17 +0900 (JST)
Subject: [ruby-changes:14235] Ruby:r26058 (trunk): * test/webrick/test_server.rb (test_daemon): simply use fork's return
naruse 2009-12-10 12:46:08 +0900 (Thu, 10 Dec 2009) New Revision: 26058 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26058 Log: * test/webrick/test_server.rb (test_daemon): simply use fork's return value, don't use pipe. Modified files: trunk/test/webrick/test_server.rb Index: test/webrick/test_server.rb =================================================================== --- test/webrick/test_server.rb (revision 26057) +++ test/webrick/test_server.rb (revision 26058) @@ -46,19 +46,13 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/