about summary refs log tree commit homepage
path: root/bin
diff options
context:
space:
mode:
authorzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-03-19 23:31:30 +0000
committerzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-03-19 23:31:30 +0000
commit6634d89019f9e8a71750494a4e031a1eab522339 (patch)
tree414741423416e14f7362ded09ab9cd9bb6ba8b9b /bin
parentebeac4b0312015147ef2319b27c903a791f122af (diff)
downloadunicorn-6634d89019f9e8a71750494a4e031a1eab522339.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@117 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'bin')
-rw-r--r--bin/mongrel_rails6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/mongrel_rails b/bin/mongrel_rails
index e66d99e..1682ae5 100644
--- a/bin/mongrel_rails
+++ b/bin/mongrel_rails
@@ -113,6 +113,12 @@ class Start < GemPlugin::Plugin "/commands"
         File.unlink @pid_file if File.exist?(@pid_file)
         @restart = true
       }
+
+      trap("INT") {
+        server.stop
+        File.unlink @pid_file if File.exist?(@pid_file)
+        @restart = false
+      }
     end
 
     # hook up any rails specific plugins