[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#513460: "procfs stores process name in a truncated form in /proc/<pid>/stat"



David Paleino wrote:
[...]
> while fixing #497540 we stumbled upon a bug in procps. Trying to fix completion
> for "killall", we wanted to use "ps axo comm" instead of "ps axo command", but
> that truncates process names at 15 characters. It could've been a procps bug,
> but the truncated form is really stored in /proc/<pid>/stat:
[...]
> Is there a reason for this 15-characters-limitation?

The in-kernel process name is limited to 16 bytes (including null
terminator), and this is unlikely to be changed.  Therefore I will
reassign this back to bash-completion.  You need to look at how killall
matches commands and replicate that.  It is probably reading the full
command line (/proc/*/cmdline) and taking the basename of the first
string.

Ben.

-- 
Ben Hutchings
Logic doesn't apply to the real world. - Marvin Minsky

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: