Merge "Don't go busy loop when waiting child process."

This commit is contained in:
Elliott Hughes 2016-02-16 18:23:32 +00:00 committed by Gerrit Code Review
commit ae2b746c82

View file

@ -408,7 +408,7 @@ static int parent(const char *tag, int parent_read, pid_t pid,
if (poll_fds[0].revents & POLLHUP) {
int ret;
ret = waitpid(pid, &status, WNOHANG);
ret = TEMP_FAILURE_RETRY(waitpid(pid, &status, 0));
if (ret < 0) {
rc = errno;
ALOG(LOG_ERROR, "logwrap", "waitpid failed with %s\n", strerror(errno));