Created
February 22, 2016 15:37
-
-
Save saml/12790a77495b376ac7e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TERM first, then KILL if not dead | |
kill -TERM $pid >/dev/null 2>&1 | |
usleep 100000 | |
if checkpid $pid && sleep 1 && | |
checkpid $pid && sleep $delay && | |
checkpid $pid ; then | |
kill -KILL $pid >/dev/null 2>&1 | |
usleep 100000 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment