Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1649)

Unified Diff: runtime/bin/process_linux.cc

Issue 23076002: Fix Process.runSync on 64-bit Mac OS (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/bin/process_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process_linux.cc
diff --git a/runtime/bin/process_linux.cc b/runtime/bin/process_linux.cc
index 595861f2c174ecb15c5be89c1d1a42a2b201f4ab..5e7e838cba95739646e9f80cd3b24d531d0a5d33 100644
--- a/runtime/bin/process_linux.cc
+++ b/runtime/bin/process_linux.cc
@@ -638,7 +638,8 @@ bool Process::Wait(intptr_t pid,
}
// Process incoming data.
- for (int i = 0; i < alive; i++) {
+ int current_alive = alive;
+ for (int i = 0; i < current_alive; i++) {
if (fds[i].revents & POLLIN) {
intptr_t avail = FDUtils::AvailableBytes(fds[i].fd);
if (fds[i].fd == out) {
@@ -661,10 +662,6 @@ bool Process::Wait(intptr_t pid,
UNREACHABLE();
}
}
- }
-
- // Process closed.
- for (int i = 0; i < alive; i++) {
if (fds[i].revents & POLLHUP) {
VOID_TEMP_FAILURE_RETRY(close(fds[i].fd));
alive--;
« no previous file with comments | « no previous file | runtime/bin/process_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698