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

Using at_exit to clean pid files

git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@303 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
zedshaw 2006-08-03 21:48:22 +00:00
parent 65fc0159de
commit fb1226bee3

View file

@ -341,7 +341,7 @@ module Mongrel
trap("INT") { log "INT signal received."; stop(need_restart=false) }
# clean up the pid file always
at_exit { File.unlink(@pid_file) if File.exists?(@pid_file) }
at_exit { File.unlink(@pid_file) if @pid_file and File.exists?(@pid_file) }
if RUBY_PLATFORM !~ /mswin/
# graceful shutdown