tools: s/read()/lxc_read_nointr()/g

parent 03876f90
......@@ -233,14 +233,13 @@ static bool do_destroy_with_snapshots(struct lxc_container *c)
return false;
}
ret = read(fd, buf, fbuf.st_size);
ret = lxc_read_nointr(fd, buf, fbuf.st_size);
close(fd);
if (ret < 0) {
ERROR("Could not read %s", path);
close(fd);
free(buf);
return false;
}
close(fd);
lxc_iterate_parts(lxcpath, buf, "\n") {
c1 = lxc_container_new(lxcname, lxcpath);
......
......@@ -202,7 +202,7 @@ static int lxc_tool_monitord_spawn(const char *lxcpath)
* synced with the child process. the if-empty-statement
* construct is to quiet the warn-unused-result warning.
*/
if (read(pipefd[0], &c, 1))
if (lxc_read_nointr(pipefd[0], &c, 1))
;
close(pipefd[0]);
......
......@@ -574,7 +574,7 @@ static int stdin_handler(int fd, uint32_t events, void *data,
if (events & EPOLLIN) {
int rc;
rc = read(fd, in_char, sizeof(*in_char));
rc = lxc_read_nointr(fd, in_char, sizeof(*in_char));
if (rc <= 0)
*in_char = '\0';
}
......
......@@ -271,7 +271,7 @@ static int do_start(void *arg)
if (start_arg->setuid) {
/* waiting until uid maps is set */
ret = read(start_arg->wait_fd, &wait_val, sizeof(wait_val));
ret = lxc_read_nointr(start_arg->wait_fd, &wait_val, sizeof(wait_val));
if (ret == -1) {
SYSERROR("Failed to read eventfd");
close(start_arg->wait_fd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment