summaryrefslogtreecommitdiffstats
path: root/base/process_util_posix.cc
diff options
context:
space:
mode:
authorpvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-10 07:46:43 +0000
committerpvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-10 07:46:43 +0000
commit66700d449400266dbfc47c35e1e360efd57e4206 (patch)
tree6b9aa8447c726540bd5a90ea495eb6d12a8b5435 /base/process_util_posix.cc
parent62c68bee3e9ced3ba82100d04da274a0cf669f25 (diff)
downloadchromium_src-66700d449400266dbfc47c35e1e360efd57e4206.zip
chromium_src-66700d449400266dbfc47c35e1e360efd57e4206.tar.gz
chromium_src-66700d449400266dbfc47c35e1e360efd57e4206.tar.bz2
BSD port changes for base/ (OS_POSIX/GTK instead of OS_LINUX
where applicable, missing includes, etc) Review URL: http://codereview.chromium.org/774001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41143 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_posix.cc')
-rw-r--r--base/process_util_posix.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc
index cca07dd..fdac7a2 100644
--- a/base/process_util_posix.cc
+++ b/base/process_util_posix.cc
@@ -269,7 +269,8 @@ void CloseSuperfluousFds(const base::InjectiveMultimap& saved_mapping) {
void SetAllFDsToCloseOnExec() {
#if defined(OS_LINUX)
const char fd_dir[] = "/proc/self/fd";
-#elif defined(OS_MACOSX) || defined(OS_FREEBSD) || defined(OS_SOLARIS)
+#elif defined(OS_MACOSX) || defined(OS_FREEBSD) || defined(OS_OPENBSD) || \
+ defined(OS_SOLARIS)
const char fd_dir[] = "/dev/fd";
#endif
ScopedDIR dir_closer(opendir(fd_dir));
@@ -479,10 +480,10 @@ ProcessMetrics::ProcessMetrics(ProcessHandle process,
: process_(process),
last_time_(0),
last_system_time_(0)
-#if defined(OS_LINUX)
- , last_cpu_(0)
-#elif defined(OS_MACOSX)
+#if defined(OS_MACOSX)
, port_provider_(port_provider)
+#elif defined(OS_POSIX)
+ , last_cpu_(0)
#endif
{
processor_count_ = base::SysInfo::NumberOfProcessors();