Method: Deamons::Geth#redirect
- Defined in:
- lib/Deamons/geth.rb
#redirect(outfile, errfile) ⇒ TrueClass
Send stdout and stderr to log files for the child process
46 47 48 49 50 51 52 53 |
# File 'lib/Deamons/geth.rb', line 46 def redirect(outfile, errfile) $stdin.reopen '/dev/null' out = File.new outfile, "a" err = File.new errfile, "a" $stdout.reopen out $stderr.reopen err $stdout.sync = $stderr.sync = true end |