- pollfd.fd = amaster;
- pollfd.events = POLLIN;
- i = ppoll (&pollfd, 1, NULL, &sigset);
- assert (i == -1 || i == 1);
- if (i == -1)
- {
- assert (errno == EINTR && signal_child_hit != 0);
- break;
- }
- /* i == 1 */
- assert (pollfd.revents != 0);
- if (pollfd.revents & POLLHUP)
- break;
- if (pollfd.revents != POLLIN)
+ pollfd[0].fd = amaster;
+ pollfd[0].events = POLLIN;
+ pollfd[1].fd = pipefd[0];
+ pollfd[1].events = POLLIN;
+ i = poll (pollfd, LENGTH (pollfd), -1);
+ if (i == -1 && errno == EINTR)