lib/adhearsion/foundation/custom_daemonizer.rb in adhearsion-0.8.3 vs lib/adhearsion/foundation/custom_daemonizer.rb in adhearsion-0.8.4

- old
+ new

@@ -1,11 +1,11 @@ # This is largely based on the Daemonize library by Travis Whitton and # Judson Lester. http://grub.ath.cx/daemonize. I cleaned it up a bit to # meet Adhearsion's quality standards. module Adhearsion module CustomDaemonizer - + # Try to fork if at all possible retrying every 5 sec if the # maximum process limit for the system has been reached def safefork begin pid = fork @@ -36,10 +36,10 @@ Dir.chdir "/" # Release old working directory File.umask 0000 # Ensure sensible umask STDIN.reopen "/dev/null" STDOUT.reopen '/dev/null', "a" - STDERR.reopen log_file + STDERR.reopen log_file, "a" return oldmode ? sess_id : 0 end end end \ No newline at end of file