Use FreeBSD-specific invocation of /bin/ps

This commit is contained in:
Marcin Cieslak
2012-08-23 16:40:36 +02:00
committed by Jon Trulson
parent 724671a2ad
commit c3cd844df6
2 changed files with 5 additions and 1 deletions

View File

@@ -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);