From: kevin_mcconnell@... (Kevin M) Date: 2004-09-21T05:44:39+09:00 Subject: WEBrick causing ruby process to hang? (on windows) When I run a ruby script that uses webrick, it seems to hang on exit. I'm using ruby 1.8.2 on Windows XP. (I don't remember having this sort of problem using linux, but I don't have a machine here to verify that.) For example, if I run the following: require 'webrick' server = WEBrick::HTTPServer.new( :Port => 8081, :DocumentRoot => '.' ) ['INT', 'TERM'].each {|signal| trap(signal) { puts "got #{signal}, shutting down..." server.shutdown puts "OK" }} server.start This will start up fine, but on hitting CTRL-C it'll display both 'puts', and then hang. I have to kill the process with task manager. Any thoughts as to what I'm doing wrong? Cheers, Kevin