Method: SimpleDaemonize.start
- Defined in:
- lib/shared/simple_daemonize.rb
.start(proc, pid_path, app_name) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/shared/simple_daemonize.rb', line 6 def self.start(proc, pid_path, app_name) working_dir = Dir.pwd group = Daemons::ApplicationGroup.new(app_name) group.new_application(:mode => :none).start File.open(pid_path, 'w') { |file| file.write(Process.pid) } Dir.chdir(working_dir) proc.call end |