Skip to content

Instantly share code, notes, and snippets.

@krutten
Created September 7, 2009 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krutten/182487 to your computer and use it in GitHub Desktop.
Save krutten/182487 to your computer and use it in GitHub Desktop.
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5.1/lib/mongrel/configurator.rb
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment