summaryrefslogtreecommitdiff
path: root/Base
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2023-05-15 14:59:26 +0100
committerAndreas Kling <kling@serenityos.org>2023-05-16 12:54:18 +0200
commit45c429853ac1e2626edfe38f96613216d450ec0e (patch)
tree15c7ae42ab41e92d8275e3be7d41ed9d84a1ab63 /Base
parenta6e701a67bf9d21ede5ccecbce3b3c9fef6ce8c4 (diff)
downloadserenity-45c429853ac1e2626edfe38f96613216d450ec0e.zip
ps: Allow `-q` option multiple times, and separated by spaces or commas
Several differences here: - Passing `-q` multiple times will add them together, instead of the last one overwriting the previous ones. - `-q` PIDs can be separated by commas as well as spaces. - We check that the PIDs are integers while parsing the arguments, instead of later on. The "parse a list of things as an option" is extracted into a helper function, because we're going to want the same logic for `-g`, `-G`, `-p`, `-t`, `-u`, and `-U`.
Diffstat (limited to 'Base')
-rw-r--r--Base/usr/share/man/man1/ps.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/Base/usr/share/man/man1/ps.md b/Base/usr/share/man/man1/ps.md
index 36b543bf11..483a21d6bf 100644
--- a/Base/usr/share/man/man1/ps.md
+++ b/Base/usr/share/man/man1/ps.md
@@ -18,7 +18,7 @@ For each process, print its PID (process ID), to which TTY it belongs, and invok
* `-a`: Consider all processes that are associated with a TTY.
* `-A` or `-e`: Consider all processes, not just those in the current TTY.
* `-f`: Also print for each process: UID (as resolved username), PPID (parent PID), and STATE (Runnable, Sleeping, Selecting, Reading, etc.)
-* `-q pid-list`: Only consider the given PIDs, if they exist.
+* `-q pid-list`: Only consider the given PIDs, if they exist. `pid-list` is a list of PIDs, separated by commas or spaces.
## Examples