apt-get-update: implement SIGINIT trap; hide 'ps' output

This commit is contained in:
Patrick Schleizer 2016-12-25 02:33:44 +00:00
parent c4089d8d40
commit 0cf6524f0f
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -8,7 +8,7 @@ sigterm_trap() {
if [ "$lastpid" = "" ]; then
exit 143
fi
ps -p "$lastpid"
ps -p "$lastpid" >/dev/null 2>&1
if [ ! "$?" = "0" ]; then
## Already terminated.
exit 143
@ -17,7 +17,7 @@ sigterm_trap() {
exit 143
}
trap "sigterm_trap" SIGTERM
trap "sigterm_trap" SIGTERM SIGINT
timeout_after="120"
kill_after="10"