]> arthur.barton.de Git - ngircd.git/commit
Test suite: simplify and enhance getpid.sh
authorAlexander Barton <alex@barton.de>
Mon, 1 Apr 2024 19:38:21 +0000 (21:38 +0200)
committerAlexander Barton <alex@barton.de>
Fri, 5 Apr 2024 21:16:07 +0000 (23:16 +0200)
commit22a8744476dff7763cd94954bd8f96fbdfc0d251
treecb987bbaaca39b05ffb3547d765a0f5e9f9db608
parent7e78c293a97239f895b862836c65c4b755abdc52
Test suite: simplify and enhance getpid.sh

- Try to only search for processes of the current user.
- Prefer using pgrep (in addition to pidof) when available.
- Streamline system overrides.
- Get rid of HEAD_FLAGS: all systems so far support "-1".
- Use "ps -o pid,comm" as the default, which is POSIX.1.
- Use "sort -r" to hopefully get the newest (=highest) PID, which is the
  case on older systems not using randomized PIDs at least.
src/testsuite/getpid.sh