]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cmd: s/read()/lxc_read_nointr()/g
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 29 Jul 2018 21:45:51 +0000 (23:45 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 29 Jul 2018 22:16:21 +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 cf0bee7d4d29134116626341b62dd0a8b2fbe599..77be14defc5a49264adcb09b7b179901819014df 100644 (file)
@@ -161,7 +161,7 @@ static int lxc_monitord_sock_handler(int fd, uint32_t events, void *data,
                int rc;
                char buf[4];
 
-               rc = read(fd, buf, sizeof(buf));
+               rc = lxc_read_nointr(fd, buf, sizeof(buf));
                if (rc > 0 && !strncmp(buf, "quit", 4))
                        quit = LXC_MAINLOOP_CLOSE;
        }
@@ -305,7 +305,7 @@ static int lxc_monitord_fifo_handler(int fd, uint32_t events, void *data,
        struct lxc_msg msglxc;
        struct lxc_monitor *mon = data;
 
-       ret = read(fd, &msglxc, sizeof(msglxc));
+       ret = lxc_read_nointr(fd, &msglxc, sizeof(msglxc));
        if (ret != sizeof(msglxc)) {
                SYSERROR("Reading from fifo failed");
                return LXC_MAINLOOP_CLOSE;
index 84dcd46e5db96a30b85aea9e5a5f8f428919d979..c342a90a0821cbe4b938951a0f05077c9ba87f25 100644 (file)
@@ -383,7 +383,7 @@ int main(int argc, char *argv[])
                        perror("write pipe");
                        exit(EXIT_FAILURE);
                }
-               if (read(pipe_fds2[0], buf, 1) < 1) {
+               if (lxc_read_nointr(pipe_fds2[0], buf, 1) < 1) {
                        perror("read pipe");
                        exit(EXIT_FAILURE);
                }
@@ -399,7 +399,7 @@ int main(int argc, char *argv[])
 
        close(pipe_fds1[1]);
        close(pipe_fds2[0]);
-       if (read(pipe_fds1[0], buf, 1) < 1) {
+       if (lxc_read_nointr(pipe_fds1[0], buf, 1) < 1) {
                perror("read pipe");
                exit(EXIT_FAILURE);
        }