This source file includes following definitions.
- GetCurrentProcId
- GetCurrentProcessHandle
- OpenProcessHandle
- OpenPrivilegedProcessHandle
- OpenProcessHandleWithAccess
- CloseProcessHandle
- GetProcId
#include "base/process/process_handle.h"
#include <unistd.h>
namespace base {
ProcessId GetCurrentProcId() {
return getpid();
}
ProcessHandle GetCurrentProcessHandle() {
return GetCurrentProcId();
}
bool OpenProcessHandle(ProcessId pid, ProcessHandle* handle) {
*handle = pid;
return true;
}
bool OpenPrivilegedProcessHandle(ProcessId pid, ProcessHandle* handle) {
return OpenProcessHandle(pid, handle);
}
bool OpenProcessHandleWithAccess(ProcessId pid,
uint32 access_flags,
ProcessHandle* handle) {
return OpenProcessHandle(pid, handle);
}
void CloseProcessHandle(ProcessHandle process) {
return;
}
ProcessId GetProcId(ProcessHandle process) {
return process;
}
}