]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
log: replace write with lxc_write_nointr 2720/head
author2xsec <dh48.jeong@samsung.com>
Thu, 8 Nov 2018 10:01:03 +0000 (19:01 +0900)
committer2xsec <dh48.jeong@samsung.com>
Thu, 8 Nov 2018 10:01:03 +0000 (19:01 +0900)
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
src/lxc/log.c

index 998f6517afceedf629b645f764f07548de92c420..1e0cc6a6731df158ebcf335ec1260a189a7971d0 100644 (file)
@@ -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