OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/process_util.h" | 5 #include "base/process_util.h" |
6 | 6 |
7 #include <sys/types.h> | 7 #include <sys/types.h> |
8 #include <unistd.h> | 8 #include <unistd.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 | 11 |
12 namespace process_util { | 12 namespace process_util { |
13 | 13 |
14 int GetCurrentProcId() { | 14 int GetCurrentProcId() { |
15 return getpid(); | 15 return getpid(); |
16 } | 16 } |
17 | 17 |
18 int GetProcId(ProcessHandle process) { | 18 int GetProcId(ProcessHandle process) { |
19 return process; | 19 return process; |
20 } | 20 } |
21 | 21 |
| 22 void EnableTerminationOnHeapCorruption() { |
| 23 // On POSIX, there nothing to do AFAIK. |
| 24 } |
| 25 |
22 void RaiseProcessToHighPriority() { | 26 void RaiseProcessToHighPriority() { |
23 // On POSIX, we don't actually do anything here. We could try to nice() or | 27 // On POSIX, we don't actually do anything here. We could try to nice() or |
24 // setpriority() or sched_getscheduler, but these all require extra rights. | 28 // setpriority() or sched_getscheduler, but these all require extra rights. |
25 } | 29 } |
26 | 30 |
27 } // namespace process_util | 31 } // namespace process_util |
OLD | NEW |