]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cmd: s/write()/lxc_write_nointr()/g
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 29 Jul 2018 21:45:18 +0000 (23:45 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 29 Jul 2018 22:16:19 +0000 (00:16 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cmd/lxc_monitord.c
src/lxc/cmd/lxc_usernsexec.c

index 38eee0a9bb1297140b398f9bcc2cfe53b778d88a..cf0bee7d4d29134116626341b62dd0a8b2fbe599 100644 (file)
@@ -312,7 +312,7 @@ static int lxc_monitord_fifo_handler(int fd, uint32_t events, void *data,
        }
 
        for (i = 0; i < mon->clientfds_cnt; i++) {
-               ret = write(mon->clientfds[i], &msglxc, sizeof(msglxc));
+               ret = lxc_write_nointr(mon->clientfds[i], &msglxc, sizeof(msglxc));
                if (ret < 0)
                        SYSERROR("Failed to send message to client file descriptor %d",
                                 mon->clientfds[i]);
@@ -428,7 +428,7 @@ int main(int argc, char *argv[])
         * if-empty-statement construct is to quiet the
         * warn-unused-result warning.
         */
-       if (write(pipefd, "S", 1))
+       if (lxc_write_nointr(pipefd, "S", 1))
                ;
        close(pipefd);
 
index 9ffc29fbf03030e539cb938176720a4bfc64c090..84dcd46e5db96a30b85aea9e5a5f8f428919d979 100644 (file)
@@ -379,7 +379,7 @@ int main(int argc, char *argv[])
                        return 1;
                }
                buf[0] = '1';
-               if (write(pipe_fds1[1], buf, 1) < 1) {
+               if (lxc_write_nointr(pipe_fds1[1], buf, 1) < 1) {
                        perror("write pipe");
                        exit(EXIT_FAILURE);
                }
@@ -409,7 +409,7 @@ int main(int argc, char *argv[])
        if (lxc_map_ids(&active_map, pid))
                fprintf(stderr, "error mapping child\n");
 
-       if (write(pipe_fds2[1], buf, 1) < 0) {
+       if (lxc_write_nointr(pipe_fds2[1], buf, 1) < 0) {
                perror("write to pipe");
                exit(EXIT_FAILURE);
        }