mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-12-24 13:19:27 -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
|
if [ "$lastpid" = "" ]; then
|
||||||
exit 143
|
exit 143
|
||||||
fi
|
fi
|
||||||
ps -p "$lastpid"
|
ps -p "$lastpid" >/dev/null 2>&1
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
## Already terminated.
|
## Already terminated.
|
||||||
exit 143
|
exit 143
|
||||||
@ -17,7 +17,7 @@ sigterm_trap() {
|
|||||||
exit 143
|
exit 143
|
||||||
}
|
}
|
||||||
|
|
||||||
trap "sigterm_trap" SIGTERM
|
trap "sigterm_trap" SIGTERM SIGINT
|
||||||
|
|
||||||
timeout_after="120"
|
timeout_after="120"
|
||||||
kill_after="10"
|
kill_after="10"
|
||||||
|
Loading…
Reference in New Issue
Block a user