HomeFreeBSD

ps(1): clean up after swapout removal

Description

ps(1): clean up after swapout removal

The process flag P_INMEM is always set. Eliminate all checks for the
bit. Also eliminate LAZY_PS define and code covered by it: we do not
have an u-area for long time, and it cannot be swapped out.

Also eliminate setting controlled by the '-f' switch, but accept it for
backward compatibility.

The 'W' process secondary state (swapped out) is impossible, stop
calculating it.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D47492

Details

Provenance
kibAuthored on Nov 9 2024, 1:37 AM
Reviewer
markj
Differential Revision
D47492: ps(1): cleanup
Parents
rG14b3a4564af3: sys/proc.h: add comments to the flag2 bits
Branches
Unknown
Tags
Unknown

Event Timeline

jlduran added inline comments.
/bin/ps/ps.c
1303

@kib This check, apparently was always returning true?

It makes all the [..] processes be displayed as (..), making test:
https://ci.freebsd.org/view/Test/job/FreeBSD-main-amd64-test/lastCompletedBuild/testReport/bin.pkill/pgrep-_s_test/main/

Fail because of the square brackets.
I imagine you have already noticed, but it never hurts to double check.
Thank you!

/bin/ps/ps.c
1303

I did not, thank you for reporting. D47561 passes all pkill tests.