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

am: ae2b746c82

* commit 'ae2b746c8274845c64d2d62ddc8f3a0b07a05f35':
  Don't go busy loop when waiting child process.
This commit is contained in:
Elliott Hughes 2016-02-16 20:45:52 +00:00 committed by android-build-merger
commit dc52d09650

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));