process_handle_posix.cc 465 B

1234567891011121314151617181920212223
  1. // Copyright (c) 2013 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "base/process/process_handle.h"
  5. #include <unistd.h>
  6. namespace base {
  7. ProcessId GetCurrentProcId() {
  8. return getpid();
  9. }
  10. ProcessHandle GetCurrentProcessHandle() {
  11. return GetCurrentProcId();
  12. }
  13. ProcessId GetProcId(ProcessHandle process) {
  14. return process;
  15. }
  16. } // namespace base