about summary refs log tree commit homepage
path: root/lib/mongrel
diff options
context:
space:
mode:
authorevanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9>2007-10-11 18:12:33 +0000
committerevanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9>2007-10-11 18:12:33 +0000
commit23c2aab29860a30b2ff297fb63ef99224c66f86a (patch)
treecc26beb6f4ec8e2942eed0d0d2552d40082f0f51 /lib/mongrel
parenta3d0ed5909918bdbd5e8c33947328f9269fad8ae (diff)
downloadunicorn-23c2aab29860a30b2ff297fb63ef99224c66f86a.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@645 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'lib/mongrel')
-rw-r--r--lib/mongrel/configurator.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/mongrel/configurator.rb b/lib/mongrel/configurator.rb
index 9886634..867e89d 100644
--- a/lib/mongrel/configurator.rb
+++ b/lib/mongrel/configurator.rb
@@ -79,15 +79,19 @@ module Mongrel
       File.unlink(@pid_file) if @pid_file and File.exists?(@pid_file)
     end
 
-    # Writes the PID file but only if we're on windows.
+    # Writes the PID file if we're not on Windows.
     def write_pid_file
       if RUBY_PLATFORM !~ /mswin/
         log "Writing PID file to #{@pid_file}"
         open(@pid_file,"w") {|f| f.write(Process.pid) }
+        open(@pid_file,"w") do |f|
+          f.write(Process.pid)
+          File.chmod(0644, @pid_file)
+        end      
       end
     end
 
-    # generates a class for cloaking the current self and making the DSL nicer
+    # Generates a class for cloaking the current self and making the DSL nicer.
     def cloaking_class
       class << self
         self