Skip to content

Commit

Permalink
lxccontainer: s/read()/lxc_read_nointr()/g
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Dec 10, 2018
1 parent ba0ac14 commit a11cad8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lxc/lxccontainer.c
Expand Up @@ -2102,7 +2102,7 @@ static char **do_lxcapi_get_interfaces(struct lxc_container *c)
/* close the write-end of the pipe */
close(pipefd[1]);

while (read(pipefd[0], &interface, IFNAMSIZ) == IFNAMSIZ) {
while (lxc_read_nointr(pipefd[0], &interface, IFNAMSIZ) == IFNAMSIZ) {
interface[IFNAMSIZ - 1] = '\0';

if (array_contains(&interfaces, interface, count))
Expand Down Expand Up @@ -2952,7 +2952,7 @@ static int copy_file(const char *old, const char *new)
}

while (1) {
len = read(in, buf, 8096);
len = lxc_read_nointr(in, buf, 8096);
if (len < 0) {
SYSERROR("Error reading old file %s", old);
goto err;
Expand Down

0 comments on commit a11cad8

Please sign in to comment.