Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make log file sync

  • Loading branch information...
commit ee14450fd49fef57dd538bd6841415c0e2a70174 1 parent a000468
@gnufied authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/backgroundrb/bdrb_start_stop.rb
View
6 lib/backgroundrb/bdrb_start_stop.rb
@@ -43,10 +43,10 @@ def start
op.write(Process.pid().to_s)
op.close
if BDRB_CONFIG[:backgroundrb][:log].nil? or BDRB_CONFIG[:backgroundrb][:log] != 'foreground'
- log_file = File.open(SERVER_LOGGER,"w+")
- [STDIN, STDOUT, STDERR].each {|desc| desc.reopen(log_file)}
+ log_file = File.open(SERVER_LOGGER,(File::WRONLY | File::APPEND | File::CREAT))
+ log_file.sync = true
+ [STDOUT, STDERR].each {|desc| desc.reopen(log_file)}
end
-
BackgrounDRb::MasterProxy.new()
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.