Use pkill -f for $KEYBOARD

Some pkill implementations match on /proc/pid/stat which is limited to
15 characters [1]. $KEYBOARD defaults to svkbd-mobile-intl which is more
then 15 characters, so use -f to match the full string. Note that sxmo
uses busybox pkill by default which does not have this limit.

[1] https://manpages.debian.org/buster/procps/pgrep.1.en.html (Notes)

This patch was previously applied, and then reverted by a careless
refactor, restore it.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
Signed-off-by: Aren Moynihan <aren@peacevolution.org>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
Jochen Sprickerhof
2023-10-03 14:19:53 -04:00
committed by Maarten van Gompel
parent 2db9353edb
commit ae7fd89b46

View File

@@ -23,7 +23,7 @@ open() {
close() {
if [ -n "$KEYBOARD" ]; then # avoid killing everything !
pkill "$KEYBOARD"
pkill -f "$KEYBOARD"
fi
}