Skip to content
Browse files

make log file sync

  • Loading branch information...
1 parent a000468 commit ee14450fd49fef57dd538bd6841415c0e2a70174 @gnufied committed Mar 28, 2009
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

0 comments on commit ee14450

Please sign in to comment.
Something went wrong with that request. Please try again.