Craig Small 3e1c00d051 ps: Match on truncated 16 char for -C
The referenced commit the comm length was increased from 16 to 64
characters to handle the larger command names for things like kernel
threads.

However most user processes are limited to 15 characters which means
if you try something like ps -C myprogramisbiggerthansixteen this would
fail to match because /proc/<PID>/comm would only be myprogramisbigg

ps now checks the comm length and if it is 15 and if the given match
is 15 or more, it will only match the first 15 characters.

This is also how killall has worked for about a year.

Thanks to Jean Delvare <jdelvare@suse.de> for the note.

References:
 commit 14005a371e5c14289e96a4927ffd1a827d3c9d85
 commit psmisc/psmisc@1188315cd0

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2020-09-24 22:01:22 +10:00
..
2012-03-04 08:04:24 +11:00
2014-07-10 21:24:19 +02:00
2020-06-04 22:25:26 +10:00
2002-02-01 22:47:29 +00:00
2020-09-24 22:01:22 +10:00