--- cde/programs/dtlogin/config/_common.ksh.src | 4 +++- cde/programs/dtprintinfo/util/Process.C | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/cde/programs/dtlogin/config/_common.ksh.src b/cde/programs/dtlogin/config/_common.ksh.src index 90154a6..b3b73ea 100644 --- a/cde/programs/dtlogin/config/_common.ksh.src +++ b/cde/programs/dtlogin/config/_common.ksh.src @@ -36,8 +36,10 @@ pexec=$(LC_TIME=C ps -p $PPID | awk 'NR==2 {print $5}') #elif defined(USL) && (OSMAJORVERSION > 1) pexec=$(LC_TIME=C ps -p $PPID | awk 'NR==2 {print $6}') -#elif defined(linux) || defined(CSRG_BASED) +#elif defined(linux) || defined(CSRG_BASED) && !defined(__FreeBSD__) pexec=$(LC_TIME=C /bin/ps -p $PPID 2>/dev/null | awk 'NR==2 {print $4}') +#elif defined(__FreeBSD__) + pexec=$(LC_TIME=C /bin/ps -o comm= -p $PPID 2>/dev/null) #else pexec=$(LC_TIME=C /usr/bin/ps -p $PPID | awk 'NR==2 {print $4}') #endif diff --git a/cde/programs/dtprintinfo/util/Process.C b/cde/programs/dtprintinfo/util/Process.C index 9dc93ce..51e9115 100644 --- a/cde/programs/dtprintinfo/util/Process.C +++ b/cde/programs/dtprintinfo/util/Process.C @@ -38,6 +38,8 @@ Process::Process() { #ifdef aix (void)Invoke("ps -e -F \"pid ppid uid command\"", &procs); +#elif defined(__FreeBSD__) + (void)Invoke("/bin/ps ax -o pid,ppid,uid,comm", &procs); #else (void)Invoke("/bin/ps -el | awk '{printf(\"%s %s %s %s\\n\",$4,$5,$3,$NF)}'", &procs); -- 1.7.9.2 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ cdesktopenv-devel mailing list cdesktopenv-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel