Project

General

Profile

« Previous | Next » 

Revision ad37be47

Added by Sam Kottler almost 12 years ago

  • ID ad37be4752c66520b43a4bf78311180d220ccac2

Create the pid parent dir if it doesn't exist

View differences:

lib/sinatra-patch.rb
FileUtils.mkdir_p(File.join(APP_ROOT, 'tmp/pids'))
# Create the PID's parent directory if it doesn't exist yet.
pid_path = SETTINGS.daemon_pid.gsub(/[^\/]+\/?$/, "")
FileUtils.mkdir_p(pid_path) unless File.exists?(pid_path)
if SETTINGS.daemon and PLATFORM !~ /mingw/
Process.daemon(true)
if SETTINGS.daemon_pid.nil?

Also available in: Unified diff