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

Unified Diff: runtime/bin/process_win.cc

Issue 85393002: Change process exit codes on Windows to always be positive (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process_win.cc
diff --git a/runtime/bin/process_win.cc b/runtime/bin/process_win.cc
index 00514c775a60d437ea6a69daae7ce44ada2dab59..6247ac946f1ea39439efcdb1f2b2a24e44e34d15 100644
--- a/runtime/bin/process_win.cc
+++ b/runtime/bin/process_win.cc
@@ -155,18 +155,13 @@ class ProcessInfoList {
FATAL("Failed unregistering wait operation");
}
// Get and report the exit code to Dart.
- int exit_code;
+ DWORD exit_code;
ok = GetExitCodeProcess(handle,
reinterpret_cast<DWORD*>(&exit_code));
if (!ok) {
FATAL1("GetExitCodeProcess failed %d\n", GetLastError());
}
- int negative = 0;
- if (exit_code < 0) {
- exit_code = abs(exit_code);
- negative = 1;
- }
- int message[2] = { exit_code, negative };
+ int message[2] = { exit_code, 0 };
DWORD written;
ok = WriteFile(exit_pipe, message, sizeof(message), &written, NULL);
// If the process has been closed, the read end of the exit
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698