From 7239b2c3624240e63c589848d5dc2272ab4d684e Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Sat, 8 May 2021 22:58:38 +0200 Subject: [PATCH] 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 --- scripts/core/sxmo_keyboard.sh | 2 +- scripts/core/sxmo_presuspend.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/core/sxmo_keyboard.sh b/scripts/core/sxmo_keyboard.sh index bf19efc..df8e257 100755 --- a/scripts/core/sxmo_keyboard.sh +++ b/scripts/core/sxmo_keyboard.sh @@ -17,7 +17,7 @@ open() { } close() { - pkill "$KEYBOARD" + pkill -f "$KEYBOARD" } if [ "$1" = "toggle" ]; then diff --git a/scripts/core/sxmo_presuspend.sh b/scripts/core/sxmo_presuspend.sh index d569b5d..e6a9712 100755 --- a/scripts/core/sxmo_presuspend.sh +++ b/scripts/core/sxmo_presuspend.sh @@ -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