]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ps: handle incorrect -D values
authorJamie Landeg-Jones <jamie@catflap.org>
Tue, 23 Apr 2024 16:44:36 +0000 (18:44 +0200)
committerPiotr Pawel Stefaniak <pstef@FreeBSD.org>
Mon, 6 May 2024 17:13:35 +0000 (19:13 +0200)
commit3f0b80bc1537c257f3bd68592832ec8cb65e1c58
treef5de616e342faad57cfa09bb8a840b4cc5620146
parent1314d14c32713b448738cc821c04a5e7482bb4af
ps: handle incorrect -D values

I just noticed a slight issue with the '-D' option. Basically,
I accidentally typed something along the lines of:

ps -Dboth-p303

I.E. missing out the "space". Instead of giving an error, it behaved as
if I'd just typed "ps".

Looking at bin/ps/ps.c, where the -D option is parsed, it doesn't
error-out if there is no valid match.

This commit fixes the bug.
bin/ps/ps.c