From ba0ac146073f376222f87e709b3090c96783cde5 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Sun, 29 Jul 2018 23:47:57 +0200 Subject: [PATCH] lxccontainer: s/write()/lxc_write_nointr()/g Signed-off-by: Christian Brauner --- src/lxc/lxccontainer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 641df150e..d501f8f0c 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -2082,7 +2082,7 @@ static char **do_lxcapi_get_interfaces(struct lxc_container *c) /* Iterate through the interfaces */ for (tempIfAddr = interfaceArray; tempIfAddr != NULL; tempIfAddr = tempIfAddr->ifa_next) { - nbytes = write(pipefd[1], tempIfAddr->ifa_name, IFNAMSIZ); + nbytes = lxc_write_nointr(pipefd[1], tempIfAddr->ifa_name, IFNAMSIZ); if (nbytes < 0) goto out; @@ -2959,8 +2959,9 @@ static int copy_file(const char *old, const char *new) } if (len == 0) break; - ret = write(out, buf, len); - if (ret < len) { // should we retry? + + ret = lxc_write_nointr(out, buf, len); + if (ret < len) { /* should we retry? */ SYSERROR("Error: write to new file %s was interrupted", new); goto err; } -- 2.47.2