procps/ps
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 14005a371e
 commit psmisc/psmisc@1188315cd0

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2020-09-24 22:01:22 +10:00
..
common.h ps: Increase command selection field to 64 2018-05-19 22:10:11 +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:13:29 +11:00
global.c Closes: #9 ps: Remove Unix98 output limitations 2015-10-26 11:18:52 +11:00
HACKING docs: remove old information from HACKING 2012-01-13 22:42:38 +01:00
help.c ps: add -q/q/--quick-pid option 2014-07-10 21:24:19 +02:00
output.c ps: eliminated inadvertent trailing double semi-colons 2020-04-10 14:35:17 +10:00
parser.c ps: eliminated inadvertent trailing double semi-colons 2020-04-10 14:35:17 +10:00
procps.1 Consolidated patch of previously merged CYGWIN support 2017-09-03 20:59:23 +10:00
ps.1 docs: some manpage fixes 2020-06-04 22:25:26 +10:00
regression
select.c ps: Match on truncated 16 char for -C 2020-09-24 22:01:22 +10:00
sortformat.c ps/sortformat.c: Avoid "sep_loc + 1" when sep_loc is NULL. 2018-05-19 07:32:22 +10:00
stacktrace.c misc: eliminate all those remaining gcc -Wall warnings 2017-05-22 21:34:32 +10:00