]> 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>
Mon, 10 Dec 2018 15:03:50 +0000 (16:03 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxc_monitord.c
src/lxc/tools/lxc_usernsexec.c

index ed5542cbdf60a6acd24e26e2c7daed4a58e629a9..d7e1cd22a80af71db6b7bd3ac63b1ddee475fd5f 100644 (file)
@@ -158,7 +158,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 = 1;
        }
@@ -297,7 +297,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: %s.", strerror(errno));
                return 1;
index 93340cfcb1fd12053357afabd993507a826e3f41..3a29a976a65d3b4a12ffcaa88fce3b2fee3691d5 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);
        }