[CRIU] Re: [PATCH cr] zdtm: open log files with O_APPEND
Pavel Emelyanov
xemul at parallels.com
Fri May 11 09:39:19 EDT 2012
On 05/11/2012 05:37 PM, Andrey Vagin wrote:
> I'm a paranoiac.
>
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
> test/zdtm/lib/msg.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/test/zdtm/lib/msg.c b/test/zdtm/lib/msg.c
> index 558b63d..9d33619 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;
Applied
More information about the CRIU
mailing list