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

Unified Diff: base/process/process_posix.cc

Issue 1086363003: Handled nullptr argument in WaitForExit() and WaitForExitWithTimeout() methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments incorporated. Created 5 years, 7 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 | « base/process/process.h ('k') | base/process/process_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_posix.cc
diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc
index a7d16f87304f2b38953c9ca9fe42f47e6c0c7634..bb987d0bbb7d453039a0445659d6d405a03032df 100644
--- a/base/process/process_posix.cc
+++ b/base/process/process_posix.cc
@@ -193,11 +193,13 @@ bool WaitForExitWithTimeoutImpl(base::ProcessHandle handle,
if (!WaitpidWithTimeout(handle, &status, timeout))
return false;
if (WIFSIGNALED(status)) {
- *exit_code = -1;
+ if (exit_code)
+ *exit_code = -1;
return true;
}
if (WIFEXITED(status)) {
- *exit_code = WEXITSTATUS(status);
+ if (exit_code)
+ *exit_code = WEXITSTATUS(status);
return true;
}
return false;
« no previous file with comments | « base/process/process.h ('k') | base/process/process_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698