Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jul 2023 00:07:37 +0100
From:      Jamie Landeg-Jones <jamie@catflap.org>
To:        freebsd-current@freebsd.org
Cc:        jamie@catflap.org, pstef@freebsd.org
Subject:   ps(1) bugs and problems
Message-ID:  <202307282307.36SN7b7v026284@donotpassgo.dyslexicfish.net>

next in thread | raw e-mail | index | archive | help
I have a program that produces a list of PIDS, that are supplied via '-p'
to /bin/ps and are sorted with '-d'.

After a late upgrade on a particular machine, I've just been bitten
by the modifications to "ps" to unconditionaly add recurive descendancy
PID lookups to the '-d' option when a pid is specified.

There is nothing in the man pages or docs to suggest that this should
be a thing, but there you go.

Rather than just patch it out, Would a patch to allow the previous
behaviour as an option (even if the option isn't default) be accepted?

In addition, there is a bug in that ps now goes into a memory-sucking
endless-loop if you do:

ps -dp0

The manual page is no longer accurate either:

'-d' says "Note that this option has no effect if the “command”
column is not the last column displayed."

That is no longer true, it doesn't matter what column is displayed last,
if you use '-p', '-d' now completely changes the output

title: ps: extend the non-standard option -d (tree view) to work with -p
https://cgit.freebsd.org/src/commit/bin/ps/ps.c?id=ca8c0d5e811048ad67d0955642c5b486e9c0f3d2

author: Piotr Pawel Stefaniak <pstef@FreeBSD.org> 2020-05-07 16:56:18 +0000
commit: ca8c0d5e811048ad67d0955642c5b486e9c0f3d2 (patch)
tree:   374be17aead18daf2e3c7477a4573f60ce62d8f0 /bin/ps/ps.c

Cheers, Jamie



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307282307.36SN7b7v026284>