Index: lib/webrick/server.rb =================================================================== --- lib/webrick/server.rb (revision 35320) +++ lib/webrick/server.rb (working copy) @@ -133,7 +133,7 @@ module WEBrick rescue Errno::EBADF, IOError => ex # if the listening socket was closed in GenericServer#shutdown, # IO::select raise it. - rescue Interrupt => ex # ^C + rescue SignalException => ex @logger.fatal ex raise rescue Exception => ex Index: test/webrick/test_server.rb =================================================================== --- test/webrick/test_server.rb (revision 35320) +++ test/webrick/test_server.rb (working copy) @@ -29,12 +29,12 @@ class TestWEBrickServer < Test::Unit::Te :StopCallback => Proc.new{ stopped += 1 }, } - e = assert_raises(Interrupt) do + e = assert_raises(SignalException) do TestWEBrick.start_server(Echo, config) { |server, addr, port, log| listener = server.listeners.first def listener.accept - Process.kill(:INT, $$) # simulate ^C + raise SignalException, 'SIGTERM' # simulate signal in main thread end Thread.pass while server.status != :Running