Merge "Don't go busy loop when waiting child process."
This commit is contained in:
commit
ae2b746c82
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue