diff options
author | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-09-26 04:51:02 +0000 |
---|---|---|
committer | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-09-26 04:51:02 +0000 |
commit | bd5e6347889e1ac07256228935f6d4a73c872f64 (patch) | |
tree | f4b1e131ed0999fad9cac0323069f190e27696fe /lib/mongrel/configurator.rb | |
parent | 583294985fc18c08405378e1eda744978e1db08c (diff) | |
download | unicorn-bd5e6347889e1ac07256228935f6d4a73c872f64.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@352 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'lib/mongrel/configurator.rb')
-rw-r--r-- | lib/mongrel/configurator.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/mongrel/configurator.rb b/lib/mongrel/configurator.rb index dd21e65..5f71f3f 100644 --- a/lib/mongrel/configurator.rb +++ b/lib/mongrel/configurator.rb @@ -70,6 +70,10 @@ module Mongrel end end + def remove_pid_file + File.unlink(@pid_file) if @pid_file and File.exists?(@pid_file) + end + # Writes the PID file but only if we're on windows. def write_pid_file if RUBY_PLATFORM !~ /mswin/ @@ -350,7 +354,7 @@ module Mongrel trap("INT") { log "INT signal received."; stop(false) } # clean up the pid file always - at_exit { File.unlink(@pid_file) if @pid_file and File.exists?(@pid_file) } + at_exit { remove_pid_file } if RUBY_PLATFORM !~ /mswin/ # graceful shutdown |