From 23c2aab29860a30b2ff297fb63ef99224c66f86a Mon Sep 17 00:00:00 2001 From: evanweaver Date: Thu, 11 Oct 2007 18:12:33 +0000 Subject: apply #14641, fix comment git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@645 19e92222-5c0b-0410-8929-a290d50e31e9 --- lib/mongrel/configurator.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/mongrel') 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 -- cgit v1.2.3-24-ge0c7