if (f->efd >= 0) {
uint64_t u;
- if ((r = read(f->efd, &u, sizeof(u))) != sizeof(u)) {
+ if ((r = pa_read(f->efd, &u, sizeof(u), NULL)) != sizeof(u)) {
if (r >= 0 || errno != EINTR) {
pa_log_error("Invalid read from eventfd: %s", r < 0 ? pa_cstrerror(errno) : "EOF");
} else
#endif
- if ((r = read(f->fds[0], &x, sizeof(x))) <= 0) {
+ if ((r = pa_read(f->fds[0], &x, sizeof(x), NULL)) <= 0) {
if (r >= 0 || errno != EINTR) {
pa_log_error("Invalid read from pipe: %s", r < 0 ? pa_cstrerror(errno) : "EOF");
if (f->efd >= 0) {
uint64_t u = 1;
- if ((r = write(f->efd, &u, sizeof(u))) != sizeof(u)) {
+ if ((r = pa_write(f->efd, &u, sizeof(u), NULL)) != sizeof(u)) {
if (r >= 0 || errno != EINTR) {
- pa_log_error("Invalid read from pipe: %s", r < 0 ? pa_cstrerror(errno) : "EOF");
+ pa_log_error("Invalid write to eventfd: %s", r < 0 ? pa_cstrerror(errno) : "EOF");
pa_assert_not_reached();
}
} else
#endif
- if ((r = write(f->fds[1], &x, 1)) != 1) {
+ if ((r = pa_write(f->fds[1], &x, 1, NULL)) != 1) {
if (r >= 0 || errno != EINTR) {
- pa_log_error("Invalid read from pipe: %s", r < 0 ? pa_cstrerror(errno) : "EOF");
+ pa_log_error("Invalid write to pipe: %s", r < 0 ? pa_cstrerror(errno) : "EOF");
pa_assert_not_reached();
}
if (f->efd >= 0) {
uint64_t u;
- if ((r = read(f->efd, &u, sizeof(u))) != sizeof(u)) {
+ if ((r = pa_read(f->efd, &u, sizeof(u), NULL)) != sizeof(u)) {
if (r >= 0 || errno != EINTR) {
- pa_log_error("Invalid read from pipe: %s", r < 0 ? pa_cstrerror(errno) : "EOF");
+ pa_log_error("Invalid read from eventfd: %s", r < 0 ? pa_cstrerror(errno) : "EOF");
pa_assert_not_reached();
}
} else
#endif
- if ((r = read(f->fds[0], &x, sizeof(x))) <= 0) {
+ if ((r = pa_read(f->fds[0], &x, sizeof(x), NULL)) <= 0) {
if (r >= 0 || errno != EINTR) {
pa_log_error("Invalid read from pipe: %s", r < 0 ? pa_cstrerror(errno) : "EOF");
for (;;) {
char x = 'x';
- if ((s = write(pipe_fd[1], &x, 1)) == 1)
+ if ((s = pa_write(pipe_fd[1], &x, 1, NULL)) == 1)
break;
pa_assert(s < 0);
if ((k = pa_poll(&pfd, 1, -1)) != 1) {
pa_assert(k < 0);
pa_assert(errno == EINTR);
- } else if ((s = read(pipe_fd[0], &x, 1)) != 1) {
+ } else if ((s = pa_read(pipe_fd[0], &x, 1, NULL)) != 1) {
pa_assert(s < 0);
pa_assert(errno == EAGAIN);
}
pa_assert(pipe_fd[0] >= 0);
- if ((s = read(pipe_fd[0], &x, sizeof(x))) < 1) {
+ if ((s = pa_read(pipe_fd[0], &x, sizeof(x), NULL)) < 1) {
pa_assert(s < 0);
pa_assert(errno == EAGAIN);
}