From: Christian Brauner Date: Sun, 29 Jul 2018 22:03:03 +0000 (+0200) Subject: utils: s/read()/lxc_read_nointr()/g X-Git-Tag: lxc-3.1.0~185^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5bc6cb0e0ccf596390cb73565ed3ea4f7e9eb80;p=thirdparty%2Flxc.git utils: s/read()/lxc_read_nointr()/g Signed-off-by: Christian Brauner --- diff --git a/src/lxc/utils.c b/src/lxc/utils.c index acda4d8dc..00c05a53c 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -1090,14 +1090,14 @@ int lxc_read_from_file(const char *filename, void *buf, size_t count) char buf2[100]; size_t count2 = 0; - while ((ret = read(fd, buf2, 100)) > 0) + while ((ret = lxc_read_nointr(fd, buf2, 100)) > 0) count2 += ret; if (ret >= 0) ret = count2; } else { memset(buf, 0, count); - ret = read(fd, buf, count); + ret = lxc_read_nointr(fd, buf, count); } if (ret < 0) @@ -2413,7 +2413,7 @@ int run_command(char *buf, size_t buf_size, int (*child_fn)(void *), void *args) close(pipefd[1]); if (buf && buf_size > 0) { - bytes = read(pipefd[0], buf, buf_size - 1); + bytes = lxc_read_nointr(pipefd[0], buf, buf_size - 1); if (bytes > 0) buf[bytes - 1] = '\0'; }