Skip to content

Commit a3815b6

Browse files
bkonyicommit-bot@chromium.org
authored andcommitted
[ VM ] Fix issue where ExitCodeHandlerEntry could get stuck in an
infinite loop if wait(...) returned an error Fixes #41978 Change-Id: Ied4cc53dcfbbb6e04179721a00f04a8cd0ef9f29 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155282 Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Ben Konyi <bkonyi@google.com>
1 parent 6f8ce20 commit a3815b6

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

runtime/bin/process_android.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ class ExitCodeHandler {
231231
process_count_--;
232232
}
233233
}
234+
} else if (pid < 0) {
235+
FATAL1("Wait for process exit failed: %d", errno);
234236
}
235237
}
236238
}

runtime/bin/process_linux.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ class ExitCodeHandler {
231231
process_count_--;
232232
}
233233
}
234+
} else if (pid < 0) {
235+
FATAL1("Wait for process exit failed: %d", errno);
234236
}
235237
}
236238
}

runtime/bin/process_macos.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ class ExitCodeHandler {
227227
process_count_--;
228228
}
229229
}
230+
} else if (pid < 0) {
231+
FATAL1("Wait for process exit failed: %d", errno);
230232
}
231233
}
232234
}

0 commit comments

Comments
 (0)