diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2006-07-20 17:47:13 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2006-07-20 17:47:13 +0000 |
commit | 485776ce70e37ecfa56740ae02ce11586b8686d9 (patch) | |
tree | 583cda80136b433fa5353c3680f6df508fa7e718 /lib/rbot | |
parent | eff60cfe6dcdfc45fc4e3d9fc158becaaf390efc (diff) |
Redirect standard streams if backgrounding was requested even if the fork failed
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/ircbot.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 88a85483..8233f3c5 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -190,16 +190,12 @@ class IrcBot exit if fork rescue NotImplementedError puts "Could not background, fork not supported" - $daemonize = false rescue => e puts "Could not background. #{e.inspect}" - $daemonize = false end - end - - if $daemonize Dir.chdir botclass # File.umask 0000 # Ensure sensible umask. Adjust as needed. + puts "Redirecting standard input/output/error" begin STDIN.reopen "/dev/null" rescue Errno::ENOENT |