Commit Graph

5 Commits

Author SHA1 Message Date
Thomas Faughnan
45aa8feef6
ps.sh: fix ps arguments to work for busybox
Use the format specifier 'ppid,args' instead of 'ppid command'. POSIX
allows either spaces or commas as separators, but busybox only allows
commas. Furthermore, 'args' is recognized by POSIX[0] while 'command' is
not. On implementations of ps that do recognize 'command', it is simply
an alias for 'args', e.g. Debian[1] and FreeBSD[2].

[0]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html
[1]: https://manpages.debian.org/bullseye/procps/ps.1.en.html
[2]: https://www.freebsd.org/cgi/man.cgi?query=ps
2022-09-20 18:30:28 -04:00
Bruno Sutic
9dc3f8c639
Always use 'ps -ao' to detect commands
Previously we used 'ps -eo' for some operating systems. It turns out
flags '-ao' work fine for all, and it should also be fine per posix spec

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html#tag_20_96
2018-09-11 11:16:30 +02:00
SilentGob
a9ac17a8f8 Correct ps flag for OpenBSD
Same flag as FreeBSD is needed
2015-01-15 23:20:29 +01:00
Bruno Sutic
8fd38588c0
Fix ps command flags for FreeBSD
This was reported by @duck in #45
2014-09-29 13:39:41 +02:00
Bruno Sutic
1b79eb2f63
Rename default strategy to ps 2014-09-21 15:12:35 +02:00