mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Wrap waitpid with TEMP_FAILURE_RETRY and use __WALL to make sure we reap all children
PiperOrigin-RevId: 242111281 Change-Id: I322623303487b0292c2aea53d6eae5d9f53d79b6
This commit is contained in:
parent
5b0c46fa18
commit
e44231e28a
|
@ -221,7 +221,7 @@ static void RunInitProcess(int signaling_fd, std::set<int> open_fds) {
|
|||
// Wait until we don't have any children anymore.
|
||||
// We cannot watch for the child pid as ptrace steals our waitpid
|
||||
// notifications. (See man ptrace / man waitpid).
|
||||
pid = waitpid(-1, &status, 0);
|
||||
pid = TEMP_FAILURE_RETRY(waitpid(-1, &status, __WALL));
|
||||
if (pid < 0) {
|
||||
if (errno == ECHILD) {
|
||||
_exit(0);
|
||||
|
|
Loading…
Reference in New Issue
Block a user