mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-04-20 12:45:49 -04:00
refactoring
This commit is contained in:
parent
5a37790e6b
commit
96ff7c8dc6
@ -21,12 +21,9 @@ sigterm_trap() {
|
||||
if [ "$lastpid" = "" ]; then
|
||||
exit 143
|
||||
fi
|
||||
ps -p "$lastpid" >/dev/null 2>&1
|
||||
if [ ! "$?" = "0" ]; then
|
||||
## Already terminated.
|
||||
exit 143
|
||||
if kill -0 -- "$lastpid" &>/dev/null ; then
|
||||
kill -s sigterm -- "$lastpid"
|
||||
fi
|
||||
kill -s sigterm "$lastpid"
|
||||
exit 143
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user