From: Christian Brauner Date: Sun, 29 Jul 2018 21:45:51 +0000 (+0200) Subject: cmd: s/read()/lxc_read_nointr()/g X-Git-Tag: lxc-3.1.0~185^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=243fdadf8ce4857f07a1bad7b0445b65d60695bd;p=thirdparty%2Flxc.git cmd: s/read()/lxc_read_nointr()/g Signed-off-by: Christian Brauner --- diff --git a/src/lxc/cmd/lxc_monitord.c b/src/lxc/cmd/lxc_monitord.c index cf0bee7d4..77be14def 100644 --- a/src/lxc/cmd/lxc_monitord.c +++ b/src/lxc/cmd/lxc_monitord.c @@ -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; diff --git a/src/lxc/cmd/lxc_usernsexec.c b/src/lxc/cmd/lxc_usernsexec.c index 84dcd46e5..c342a90a0 100644 --- a/src/lxc/cmd/lxc_usernsexec.c +++ b/src/lxc/cmd/lxc_usernsexec.c @@ -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); }