am 023bc0a4: Merge "Fix deadlocks."

* commit '023bc0a426d0500904d5a9d2ddf4b7dfecf9ce6a':
  Fix deadlocks.
This commit is contained in:
Elliott Hughes 2014-12-04 09:22:00 +00:00 committed by Android Git Automerger
commit fa969cd1f9

View file

@ -76,6 +76,7 @@ void framebuffer_service(int fd, void *cookie)
exit(1);
}
close(fds[1]);
fd_screencap = fds[0];
/* read w, h & format */
@ -173,10 +174,9 @@ void framebuffer_service(int fd, void *cookie)
}
done:
TEMP_FAILURE_RETRY(waitpid(pid, NULL, 0));
close(fds[0]);
close(fds[1]);
TEMP_FAILURE_RETRY(waitpid(pid, NULL, 0));
pipefail:
close(fd);
}