diff options
Diffstat (limited to 'third_party/heimdal/tests/kdc/leaks-kill.sh')
-rw-r--r-- | third_party/heimdal/tests/kdc/leaks-kill.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/third_party/heimdal/tests/kdc/leaks-kill.sh b/third_party/heimdal/tests/kdc/leaks-kill.sh new file mode 100644 index 00000000000..1474bdd18c4 --- /dev/null +++ b/third_party/heimdal/tests/kdc/leaks-kill.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +name=$1 +pid=$2 + +kill $pid +set -- . +while kill -0 $pid 2>/dev/null +do + set -- "$@" "." + if [ $# -gt 4 ] + then + kill kill -9 $pid 2> /dev/null + break + fi + sleep 1 +done + +set -- . +while kill -0 $pid 2>/dev/null +do + set -- "$@" "." + if [ $# -gt 4 ]; then exit 1; fi + sleep 1 +done + +exit 0 |