Commit b63451e5 authored by Pavel Emelyanov's avatar Pavel Emelyanov

log: Open log file with O_APPEND

Otherwise multiple writers can screw each-other's messages.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 1e6d3227
...@@ -39,7 +39,7 @@ int log_init(const char *output) ...@@ -39,7 +39,7 @@ int log_init(const char *output)
} }
if (output) { if (output) {
new_logfd = open(output, O_CREAT | O_WRONLY, 0600); new_logfd = open(output, O_CREAT | O_WRONLY | O_APPEND, 0600);
if (new_logfd < 0) { if (new_logfd < 0) {
pr_perror("Can't create log file %s", output); pr_perror("Can't create log file %s", output);
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment