]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxccontainer: s/write()/lxc_write_nointr()/g
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 29 Jul 2018 21:47:57 +0000 (23:47 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 10 Dec 2018 15:04:34 +0000 (16:04 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxccontainer.c

index 641df150ec8225f05c9475d4cdfbdb159215694c..d501f8f0cb633e9d08ed012a6f081ddb4a9dac5a 100644 (file)
@@ -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;
                }