reassign 698034 procps retitle 698034 pkill and related tools fail for long process names without warning stop
On 2013-01-12 23:04, patrick295767 wrote: > pkill matchbox-keyboard does not work > it works with killall This fails with plain pkill due to a limitation of pkill/Linux. The pkill(1) man page says, "The process name used for matching is limited to the 15 characters present in the output of /proc/pid/stat. Use the -f option to match against the complete command line, /proc/pid/cmdline." The 15 character limit comes from Linux defining only a 16-byte array to hold the process name. Since "matchbox-keyboard" is more than 15 characters, the process name is truncated to "matchbox-keyboa". So, you could kill the process with pkill if you truncate the name yourself to match, and use "pkill matchbox-keyboa", or, more sanely, you should use "pkill -f matchbox-keyboard". It seems to me that it is a bug in procps that pkill/pgrep don't work for long process names without any warning, so I am reassigning the bug report to that package). Currently plain pkill/pgrep with a process name longer than the OS limit will always do nothing. Automatic wildcard behaviour, including by truncating the process name argument passed to pkill, might be dangerous (though not much more dangerous than other use of pkill), but perhaps it should fail with an error in this case, or at least give a warning. -- Moray -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org