Module: Nanite::DaemonizeHelper
Instance Method Summary collapse
Instance Method Details
#daemonize ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/nanite/daemonize.rb', line 3 def daemonize exit if fork Process.setsid exit if fork $stdin.reopen("/dev/null") $stdout.reopen(log.file, "a") $stderr.reopen($stdout) end |