mongrel does not allow to trap INT on Windows

A

aurelianito

Hi,

I'm trying the camping web framework under windows with mongrel (with
ruby installed from One Click Ruby installer 16 for Ruby 1.8.4.). And
while I'm able to see the web pages in a browser I'm unable to shut it
down with CTRL-C. Do you know what is the problem?

Any responses will be highly appreciated,
Thank you,
Aureliano.

PS: Below is the code I use to run Mongrel:

require 'mongrel/camping'

Pru1::Models::Base.logger = Logger.new('camping.log')
handler = Mongrel::Camping::CampingHandler.new(Pru1)
server = Mongrel::HttpServer.new("127.0.0.1", "3000")
server.register("/", handler)
server.register("/favicon.ico", Mongrel::Error404Handler.new(""))
thread = server.run
puts "Mongrel started"
trap("INT") { server.stop }
thread.join
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,169
Messages
2,570,918
Members
47,458
Latest member
Chris#

Latest Threads

Top