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);
* 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]);
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';
}
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);