- File.open(log_file, mode = "a") { |file| file.puts [time0, time1, elap, user, exit_status, command].join("\t") }
+ File.open(log_file, "a") do |fh|
+ fh.flock(File::LOCK_EX)
+ fh.puts [time0, time1, elap, user, exit_status, command].join("\t")
+ end