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)

Signed-off-by: Anjandev Momi <anjan@momi.ca>
This commit is contained in:
Jochen Sprickerhof 2021-05-08 22:58:38 +02:00 committed by Anjandev Momi
parent 06a6d472d7
commit 7239b2c362
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@ open() {
}
close() {
pkill "$KEYBOARD"
pkill -f "$KEYBOARD"
}
if [ "$1" = "toggle" ]; then

View file

@ -8,7 +8,7 @@
pkill -STOP conky
pkill clickclack
pkill $KEYBOARD
pkill -f "$KEYBOARD"
# If this script returns a non-zero exit code, suspension will be cancelled