about summary refs log tree commit homepage
path: root/lib/mongrel
diff options
context:
space:
mode:
authorluislavena <luislavena@19e92222-5c0b-0410-8929-a290d50e31e9>2008-03-31 08:19:14 +0000
committerluislavena <luislavena@19e92222-5c0b-0410-8929-a290d50e31e9>2008-03-31 08:19:14 +0000
commit9ed23d6b1be6f24a5ac43ff77db20ac77dbf176d (patch)
tree246bdd8eb5fd8f18443c9bcbc177848c4ecdbb66 /lib/mongrel
parenteda1ea00904dcf4b4e7ed533b327a842713ac11a (diff)
downloadunicorn-9ed23d6b1be6f24a5ac43ff77db20ac77dbf176d.tar.gz
Added shebang to mongrel_rails (makes latest RubyGem happier).


git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1000 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'lib/mongrel')
-rw-r--r--lib/mongrel/configurator.rb6
-rw-r--r--lib/mongrel/rails.rb2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/mongrel/configurator.rb b/lib/mongrel/configurator.rb
index bbb88ba..439b44c 100644
--- a/lib/mongrel/configurator.rb
+++ b/lib/mongrel/configurator.rb
@@ -81,7 +81,7 @@ module Mongrel
 
     # Writes the PID file if we're not on Windows.
     def write_pid_file
-      if RUBY_PLATFORM !~ /mswin/
+      if RUBY_PLATFORM !~ /djgpp|(cyg|ms|bcc)win|mingw/
         log "Writing PID file to #{@pid_file}"
         open(@pid_file,"w") {|f| f.write(Process.pid) }
         open(@pid_file,"w") do |f|
@@ -185,7 +185,7 @@ module Mongrel
     def daemonize(options={})
       ops = resolve_defaults(options)
       # save this for later since daemonize will hose it
-      if RUBY_PLATFORM !~ /mswin/
+      if RUBY_PLATFORM !~ /djgpp|(cyg|ms|bcc)win|mingw/
         require 'daemons/daemonize'
 
         logfile = ops[:log_file]
@@ -366,7 +366,7 @@ module Mongrel
       # clean up the pid file always
       at_exit { remove_pid_file }
 
-      if RUBY_PLATFORM !~ /mswin/
+      if RUBY_PLATFORM !~ /djgpp|(cyg|ms|bcc)win|mingw/
         # graceful shutdown
         trap("TERM") { log "TERM signal received."; stop }
         trap("USR1") { log "USR1 received, toggling $mongrel_debug_client to #{!$mongrel_debug_client}"; $mongrel_debug_client = !$mongrel_debug_client }
diff --git a/lib/mongrel/rails.rb b/lib/mongrel/rails.rb
index 853ae4e..7f66a5e 100644
--- a/lib/mongrel/rails.rb
+++ b/lib/mongrel/rails.rb
@@ -173,7 +173,7 @@ module Mongrel
         ops = resolve_defaults(options)
         setup_signals(options)
 
-        if RUBY_PLATFORM !~ /mswin/
+        if RUBY_PLATFORM !~ /djgpp|(cyg|ms|bcc)win|mingw/
           # rails reload
           trap("HUP") { log "HUP signal received."; reload!          }