From: Christian Brauner Date: Sun, 29 Jul 2018 21:47:57 +0000 (+0200) Subject: lxccontainer: s/write()/lxc_write_nointr()/g X-Git-Tag: lxc-2.0.10~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba0ac146073f376222f87e709b3090c96783cde5;p=thirdparty%2Flxc.git lxccontainer: s/write()/lxc_write_nointr()/g Signed-off-by: Christian Brauner --- 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; }