procps/ps
Craig Small 955aaaf732 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.

Copy of commit from master.

References:
 commit 14005a371e
 commit psmisc/psmisc@1188315cd0
 commit 3e1c00d051

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2020-09-24 22:19:11 +10:00
..
common.h library: make that 'escape_str' private to our library 2020-07-05 21:13:01 +10:00
COPYING license: update FSF addresses 2012-03-04 08:04:24 +11:00
display.c ps: for abnormal end allow core dumps (fix qualys bug) 2020-01-06 09:11:20 +11:00
global.c misc: adapted programs impacted by header file changes 2019-03-26 19:55:30 +11:00
HACKING
help.c library: cleanup of library includes 2016-04-16 17:03:57 +10:00
output.c library: make that 'escape_str' private to our library 2020-07-05 21:13:01 +10:00
parser.c ps: eliminated inadvertent trailing double semi-colons 2020-04-10 14:37:15 +10:00
ps.1 docs: some manpage fixes 2020-06-04 22:33:16 +10:00
regression
select.c ps: Match on truncated 16 char for -C 2020-09-24 22:19:11 +10:00
sortformat.c 0067-ps/sortformat.c: Avoid "sep_loc + 1" when sep_loc is NULL. 2018-06-09 21:45:38 +10:00
stacktrace.c misc: just eliminate several 'unused' warning messages 2016-07-26 07:59:48 +10:00