Skip to content

Commit

Permalink
log: replace write with lxc_write_nointr
Browse files Browse the repository at this point in the history
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
  • Loading branch information
2xsec authored and Christian Brauner committed Nov 22, 2018
1 parent ede7283 commit 94abc19
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/lxc/log.c
Expand Up @@ -41,6 +41,7 @@

#include "caps.h"
#include "config.h"
#include "file_utils.h"
#include "log.h"
#include "lxccontainer.h"
#include "utils.h"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 94abc19

Please sign in to comment.