diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-20 15:09:55 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-20 15:09:55 +0000 |
commit | a4dc33f2e485e586cc3fb03142c2800249fe9ced (patch) | |
tree | 0ea6b3a6fa9ee5dfcec478ca986ead1f8014bec9 /base | |
parent | a8c085ff7b9dfc2ae719e279363d37a24918f067 (diff) | |
download | chromium_src-a4dc33f2e485e586cc3fb03142c2800249fe9ced.zip chromium_src-a4dc33f2e485e586cc3fb03142c2800249fe9ced.tar.gz chromium_src-a4dc33f2e485e586cc3fb03142c2800249fe9ced.tar.bz2 |
Cleanup: change PIDs to base::ProcessId (or pid_t, as appropriate).
We probably want to discourage the use of ints for PIDs. This is a start; there are many other places where we should fix this.
BUG=25272
TEST=none
Review URL: http://codereview.chromium.org/300010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29511 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/process_util.h | 4 | ||||
-rw-r--r-- | base/process_util_posix.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/base/process_util.h b/base/process_util.h index 89e6346..caf39e8 100644 --- a/base/process_util.h +++ b/base/process_util.h @@ -37,8 +37,8 @@ typedef IO_COUNTERS IoCounters; #elif defined(OS_POSIX) // TODO(port): we should not rely on a Win32 structure. struct ProcessEntry { - int pid; - int ppid; + base::ProcessId pid; + base::ProcessId ppid; char szExeFile[NAME_MAX + 1]; }; diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc index 61ecb7e..d365d01 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) |