fix(install): kill background jobs on Ctrl+C
- jobs -p | xargs kill in cleanup ensures sudo keepalive and spinner processes are terminated on SIGINT
This commit is contained in:
1 file changed
+1
@@ -193,6 +193,7 @@ cleanup() {
|
||||
if [ -n "${SUDO_KEEPER_PID:-}" ]; then
|
||||
kill "$SUDO_KEEPER_PID" 2>/dev/null || true
|
||||
fi
|
||||
jobs -p 2>/dev/null | xargs -r kill 2>/dev/null || true
|
||||
}
|
||||
trap cleanup EXIT INT TERM
|
||||
|
||||
|
||||
Reference in new issue
Block a user