From c4f0e1d16f6999b055b0fa310456870f12a6dbea Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Sat, 19 Apr 2025 12:57:14 -0400 Subject: [PATCH] refactoring --- usr/libexec/security-misc/apt-get-update | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr/libexec/security-misc/apt-get-update b/usr/libexec/security-misc/apt-get-update index d645cf9..d5d4da0 100755 --- a/usr/libexec/security-misc/apt-get-update +++ b/usr/libexec/security-misc/apt-get-update @@ -21,9 +21,10 @@ sigterm_trap() { if [ "$lastpid" = "" ]; then exit 143 fi - if kill -0 -- "$lastpid" &>/dev/null ; then - kill -s sigterm -- "$lastpid" + if ! kill -0 -- "$lastpid" &>/dev/null ; then + exit 143 fi + kill -s sigterm -- "$lastpid" exit 143 }