mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-06-09 05:22:42 -04:00
refactoring
This commit is contained in:
parent
5a37790e6b
commit
96ff7c8dc6
1 changed files with 2 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue