mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-12-24 13:09:28 -05:00
apt-get-update: implement SIGINIT trap; hide 'ps' output
This commit is contained in:
parent
c4089d8d40
commit
0cf6524f0f
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user