Created
March 14, 2011 06:57
-
-
Save chrisbnt/868855 to your computer and use it in GitHub Desktop.
Murder - it's killall, but it really means it. Starts with SIGINT, if that doesn't work, tries a SIGQUIT, and if that doesn't work, it pulls out the SIGKILL hammer
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
#! /bin/bash | |
SIGNAL="SIGINT" | |
while killall -${SIGNAL} "$@"; do | |
if [ $SIGNAL = SIGINT ]; then | |
SIGNAL="SIGQUIT" | |
else | |
SIGNAL="SIGKILL" | |
fi | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment