1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-12 09:50:29 +00:00

Testsuite: make getpid.sh work even when run as root

Use ps(1) flag "-a" (as well as "-f"):
"Select all processes except both session leaders (see getsid(2)) and
processes not associated with a terminal."

Thanks to Götz Hoffart for reporting this problem!
This commit is contained in:
Alexander Barton 2011-07-30 18:47:58 +02:00
parent b7780e3f2a
commit 9f3690c39c

View File

@ -16,7 +16,7 @@ elif [ $UNAME = "GNU" ]; then
elif [ $UNAME = "SunOS" ]; then
PS_FLAGS="-af"; PS_PIDCOL=2; HEAD_FLAGS="-n 1"
else
PS_FLAGS="-f"; PS_PIDCOL="2"; HEAD_FLAGS="-n 1"
PS_FLAGS="-af"; PS_PIDCOL="2"; HEAD_FLAGS="-n 1"
ps $PS_FLAGS > /dev/null 2>&1
if [ $? -ne 0 ]; then PS_FLAGS="a"; PS_PIDCOL="1"; fi
fi