1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

We must avoid the trapping of signals for win32. Modified mongrel_rails to circumvent this.

git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@62 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
luislavena 2006-02-27 00:56:59 +00:00
parent e8d6936a04
commit 9bb6edf113

View file

@ -124,23 +124,27 @@ class StartCommand < Mongrel::Command::Command
server.register("/", rails)
server.run
# graceful shutdown
trap("TERM") {
server.stop
}
# rails reload
trap("HUP") {
server.stop
@restart = true
}
# restart
trap("USR2") {
server.stop
@restart = true
}
# signal trapping just applies to posix systems
# TERM is a valid signal, but still doesn't gracefuly shutdown on win32.
if RUBY_PLATFORM !~ /mswin/
# graceful shutdown
trap("TERM") {
server.stop
}
# rails reload
trap("HUP") {
server.stop
@restart = true
}
# restart
trap("USR2") {
server.stop
@restart = true
}
end
begin
STDERR.puts "Server ready."
server.acceptor.join