# File lib/main/daemon.rb, line 410 def daemonize!(options = {}, &block) # optional directory and umask # chdir = options[:chdir] || options['chdir'] || @daemon_dir || '.' umask = options[:umask] || options['umask'] || 0 # drop to the background avoiding the possibility of zombies.. # detach!(&block) # close all open io handles *except* these ones # keep_ios(STDIN, STDOUT, STDERR, @lock) # sane directory and umask # Dir::chdir(chdir) File::umask(umask) # global daemon flag # $DAEMON = true end