]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Testsuite: make getpid.sh work even when run as root
authorAlexander Barton <alex@barton.de>
Sat, 30 Jul 2011 16:47:58 +0000 (18:47 +0200)
committerAlexander Barton <alex@barton.de>
Sat, 30 Jul 2011 16:47:58 +0000 (18:47 +0200)
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!

src/testsuite/getpid.sh

index 5e169175295d53d9d02549937827151a4225983d..fd3b3422b1e5c90b85ceb0d672efce2d7719290a 100755 (executable)
@@ -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