diff options
Diffstat (limited to 'base/process.h')
-rw-r--r-- | base/process.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/base/process.h b/base/process.h index de26939..312f84c 100644 --- a/base/process.h +++ b/base/process.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" +#include <sys/types.h> #ifdef OS_WIN #include <windows.h> #endif @@ -15,11 +16,14 @@ namespace base { // ProcessHandle is a platform specific type which represents the underlying OS // handle to a process. +// ProcessId is a number which identifies the process in the OS. #if defined(OS_WIN) typedef HANDLE ProcessHandle; +typedef DWORD ProcessId; #elif defined(OS_POSIX) // On POSIX, our ProcessHandle will just be the PID. -typedef int ProcessHandle; +typedef pid_t ProcessHandle; +typedef pid_t ProcessId; #endif class Process { @@ -37,7 +41,7 @@ class Process { void set_handle(ProcessHandle handle) { process_ = handle; } // Get the PID for this process. - int32 pid() const; + ProcessId pid() const; // Is the this process the current process. bool is_current() const; |