mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-18 00:58:31 +00:00
log: Open logc files with O_TRUNC
It's really confusing when one use -o option and didn't see update on top of log file. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
eb12c976a3
commit
301b2fe2ce
1 changed files with 1 additions and 1 deletions
2
log.c
2
log.c
|
|
@ -42,7 +42,7 @@ int log_init(const char *output)
|
|||
}
|
||||
|
||||
if (output) {
|
||||
new_logfd = open(output, O_CREAT | O_WRONLY | O_APPEND, 0600);
|
||||
new_logfd = open(output, O_CREAT | O_TRUNC | O_WRONLY | O_APPEND, 0600);
|
||||
if (new_logfd < 0) {
|
||||
pr_perror("Can't create log file %s", output);
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue