From 809d44495ac1aa217830405fb7d2ee7a50dc1a14 Mon Sep 17 00:00:00 2001 From: 2xsec Date: Thu, 8 Nov 2018 19:01:03 +0900 Subject: [PATCH] log: replace write with lxc_write_nointr Signed-off-by: 2xsec --- src/lxc/log.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lxc/log.c b/src/lxc/log.c index 998f6517a..1e0cc6a67 100644 --- a/src/lxc/log.c +++ b/src/lxc/log.c @@ -41,6 +41,7 @@ #include "caps.h" #include "config.h" +#include "file_utils.h" #include "log.h" #include "lxccontainer.h" #include "utils.h" @@ -360,12 +361,7 @@ static int log_append_logfile(const struct lxc_log_appender *appender, buffer[n] = '\n'; -again: - ret = write(fd_to_use, buffer, n + 1); - if (ret < 0 && errno == EINTR) - goto again; - - return ret; + return lxc_write_nointr(fd_to_use, buffer, n + 1); } #if HAVE_DLOG -- 2.47.2