2 # Find ps argument for Amanda::Process
4 AC_DEFUN([AMANDA_PS_ARGUMENT],
7 AC_MSG_CHECKING([ps argument to use])
10 # ps is *very* non-portable, and across many systems, the same option
11 # (e.g., -e) can mean different things. So this macro tries to
12 # special-case most known systems, and makes an effort to detect unknown
16 PS_ARGUMENT="-eo pid,ppid,comm"
20 PS_ARGUMENT="-eo pid,ppid,command"
24 PS_ARGUMENT="-axo pid,ppid,command"
28 PS_ARGUMENT="-aAco pid,ppid,command"
32 # Cygwin is special-cased in Amanda::Process
37 # HPUX's 'PS' needs the env var UNIX95 to run in "xpg4" mode
39 PS_ARGUMENT="-eo pid,ppid,comm"
44 "-axo pid,ppid,command" \
45 "-aAco pid,ppid,command" \
48 ps $try >/dev/null 2>/dev/null
49 if test $? -eq 0; then
54 if test -z "$PS_ARGUMENT"; then
55 AC_MSG_ERROR([Can't find ps argument to use.])
60 AC_MSG_RESULT($PS_ARGUMENT)