mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 21:38:16 +00:00
zdtm: open log files with O_APPEND
I'm a paranoiac. Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
33051cd3b3
commit
f53888480e
@ -46,11 +46,11 @@ void dump_msg(const char *fname)
|
||||
if (msg_buf.ptr != msg_buf.buffer) {
|
||||
int fd;
|
||||
if (proc_id == 0) {
|
||||
fd = open(fname, O_WRONLY | O_CREAT | O_EXCL, 0644);
|
||||
fd = open(fname, O_WRONLY | O_CREAT | O_EXCL | O_APPEND, 0644);
|
||||
} else {
|
||||
char fname_child[1000];
|
||||
snprintf(fname_child,1000,"%s.%d",fname,proc_id);
|
||||
fd = open(fname_child, O_WRONLY | O_CREAT, 0644);
|
||||
fd = open(fname_child, O_WRONLY | O_CREAT | O_APPEND, 0644);
|
||||
}
|
||||
if (fd < 0)
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user