From 9a3bb5e59ef739d7c1f59fa957b375ee01f2be6e Mon Sep 17 00:00:00 2001 From: GokuPlay609 Date: Wed, 25 Feb 2026 13:16:46 +0530 Subject: [PATCH] fix: sudo keepalive cleanup leaking exit code 143 wait on a SIGTERM-killed process returns 143 (128+15). With set -e active in the setup script, this overrides the script's exit code, making a successful install appear failed. Amp-Thread-ID: https://ampcode.com/threads/T-019c93b6-b135-743f-8844-6a1ca8875506 Co-authored-by: Amp --- sdata/lib/functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdata/lib/functions.sh b/sdata/lib/functions.sh index 423f45b81..bc8f08400 100644 --- a/sdata/lib/functions.sh +++ b/sdata/lib/functions.sh @@ -119,8 +119,8 @@ function sudo_init_keepalive(){ # Stop the sudo keepalive background process function sudo_stop_keepalive(){ if [[ -n "$SUDO_KEEPALIVE_PID" ]] && kill -0 "$SUDO_KEEPALIVE_PID" 2>/dev/null; then - kill "$SUDO_KEEPALIVE_PID" 2>/dev/null - wait "$SUDO_KEEPALIVE_PID" 2>/dev/null + kill "$SUDO_KEEPALIVE_PID" 2>/dev/null || true + wait "$SUDO_KEEPALIVE_PID" 2>/dev/null || true SUDO_KEEPALIVE_PID="" fi }