HomeFreeBSD

ps(1): Fix formatting of the "command" field for kernel threads.

Description

ps(1): Fix formatting of the "command" field for kernel threads.

When -H is specified, for kernel threads the command is formatted as
"<proc name>/<td name>" and truncated to MAXCOMLEN. But each of the
proc name and td name may be up to MAXCOMLEN bytes in length.

Also handle the ki_moretdname field to ensure that the full thread name
gets printed. This is already handled correctly when formatting for
"-o tdname".

Reported by: freqlabs
Reviewed by: freqlabs
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25840

Details

Provenance
markjAuthored on
Reviewer
freqlabs
Differential Revision
D25840: ps(1): Fix formatting of the "command" field for kernel threads.
Parents
rS363648: MFC r363395:
Branches
Unknown
Tags
Unknown