diff options
Diffstat (limited to 'sal/osl/unx/process.c')
-rw-r--r-- | sal/osl/unx/process.c | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c index 300a1446e81a..d16c025ddc36 100644 --- a/sal/osl/unx/process.c +++ b/sal/osl/unx/process.c @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -41,7 +42,7 @@ #endif -#ifdef FREEBSD +#if defined(FREEBSD) || defined(NETBSD) || defined(DRAGONFLY) #include <machine/param.h> #endif @@ -70,7 +71,7 @@ #define MAX_ARGS 255 #define MAX_ENVS 255 -#if defined(MACOSX) || defined(IORESOURCE_TRANSFER_BSD) +#if defined(MACOSX) || defined(IORESOURCE_TRANSFER_BSD) || defined(AIX) #define CONTROLLEN (sizeof(struct cmsghdr) + sizeof(int)) #endif @@ -475,7 +476,7 @@ static void ChildStatusProc(void *pData) if (! INIT_GROUPS(data.m_name, data.m_gid) || (setuid(data.m_uid) != 0)) OSL_TRACE("Failed to change uid and guid, errno=%d (%s)\n", errno, strerror(errno)); -#if defined(LINUX) || defined (FREEBSD) +#if defined(LINUX) || defined (FREEBSD) || defined(NETBSD) || defined(OPENBSD) || defined(DRAGONFLY) unsetenv("HOME"); #else putenv("HOME="); @@ -1350,32 +1351,6 @@ oslProcessError SAL_CALL osl_getProcessInfo(oslProcess Process, oslProcessData F close(fd); } -#elif defined(HPUX) - - struct pst_status prstatus; - - if (pstat_getproc(&prstatus, sizeof(prstatus), (size_t)0, pid) == 1) - { - if (Fields & osl_Process_CPUTIMES) - { - pInfo->UserTime.Seconds = prstatus.pst_utime; - pInfo->UserTime.Nanosec = 500000L; - pInfo->SystemTime.Seconds = prstatus.pst_stime; - pInfo->SystemTime.Nanosec = 500000L; - - pInfo->Fields |= osl_Process_CPUTIMES; - } - - if (Fields & osl_Process_HEAPUSAGE) - { - pInfo->HeapUsage = prstatus.pst_vdsize*PAGESIZE; - - pInfo->Fields |= osl_Process_HEAPUSAGE; - } - - return (pInfo->Fields == Fields) ? osl_Process_E_None : osl_Process_E_Unknown; - } - #elif defined(LINUX) if ( (Fields & osl_Process_CPUTIMES) || (Fields & osl_Process_HEAPUSAGE) ) @@ -1534,3 +1509,5 @@ oslProcessError SAL_CALL osl_joinProcess(oslProcess Process) { return osl_joinProcessWithTimeout(Process, NULL); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |