refactoring

This commit is contained in:
Patrick Schleizer 2025-04-19 12:57:14 -04:00
parent 81634930fa
commit c4f0e1d16f
No known key found for this signature in database
GPG key ID: CB8D50BB77BB3C48

View file

@ -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
}