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

Unified Diff: base/process_util_posix.cc

Issue 300010: Cleanup: change PIDs to base::ProcessId (or pid_t) (Closed)
Patch Set: Print out PID as int64 in case ProcessId type ever grows. Created 11 years, 2 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_util.h ('k') | chrome/app/chrome_dll_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_posix.cc
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc
index 61ecb7efe183f5b3f567e39242789967c75686f0..d365d0131d5b64b12c4b0cdac71fe25e9588f979 100644
--- a/base/process_util_posix.cc
+++ b/base/process_util_posix.cc
@@ -77,7 +77,7 @@ bool KillProcess(ProcessHandle process_id, int exit_code, bool wait) {
// The process may not end immediately due to pending I/O
bool exited = false;
while (tries-- > 0) {
- int pid = HANDLE_EINTR(waitpid(process_id, NULL, WNOHANG));
+ pid_t pid = HANDLE_EINTR(waitpid(process_id, NULL, WNOHANG));
if (pid == process_id) {
exited = true;
break;
@@ -330,7 +330,7 @@ void RaiseProcessToHighPriority() {
bool DidProcessCrash(bool* child_exited, ProcessHandle handle) {
int status;
- const int result = HANDLE_EINTR(waitpid(handle, &status, WNOHANG));
+ const pid_t result = HANDLE_EINTR(waitpid(handle, &status, WNOHANG));
if (result == -1) {
PLOG(ERROR) << "waitpid(" << handle << ")";
if (child_exited)
« no previous file with comments | « base/process_util.h ('k') | chrome/app/chrome_dll_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698