diff options
| author | Alexander Barton <alex@barton.de> | 2011-07-30 18:47:58 +0200 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2011-07-30 18:47:58 +0200 |
| commit | 9f3690c39c2bd7cefbed8e3ea1f9519dd25d35c8 (patch) | |
| tree | 14ebf6127560b7fcb276d3b4426e0f3c9f47a3c3 /src/testsuite/getpid.sh | |
| parent | b7780e3f2acb989fab7d98cb79d5f5dff65accbc (diff) | |
| download | ngircd-9f3690c39c2bd7cefbed8e3ea1f9519dd25d35c8.tar.gz ngircd-9f3690c39c2bd7cefbed8e3ea1f9519dd25d35c8.zip | |
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!
Diffstat (limited to 'src/testsuite/getpid.sh')
| -rwxr-xr-x | src/testsuite/getpid.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testsuite/getpid.sh b/src/testsuite/getpid.sh index 5e169175..fd3b3422 100755 --- a/src/testsuite/getpid.sh +++ b/src/testsuite/getpid.sh @@ -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 |