From f53888480ee93a8ab776361b10cbf20ab2dc199c Mon Sep 17 00:00:00 2001 From: Andrey Vagin Date: Fri, 11 May 2012 17:37:00 +0400 Subject: [PATCH] zdtm: open log files with O_APPEND I'm a paranoiac. Signed-off-by: Andrey Vagin Signed-off-by: Pavel Emelyanov --- test/zdtm/lib/msg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/zdtm/lib/msg.c b/test/zdtm/lib/msg.c index 558b63dc1..9d33619db 100644 --- a/test/zdtm/lib/msg.c +++ b/test/zdtm/lib/msg.c @@ -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;