diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2008-11-09 18:08:23 -0500 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2008-11-09 18:08:23 -0500 |
commit | 60bb324da7c83092c354a7bb4f66116fddd3790a (patch) | |
tree | 570d9f553152cc8f9086e56ddf87b83f3c2c51de | |
parent | 6bc022e40bca1b5cd4aa5878572faa3152a9195c (diff) |
tests/basic ensure that any lingering sshd process will get killed off.
-rwxr-xr-x | tests/basic | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/basic b/tests/basic index c38a74b..5ba7a25 100755 --- a/tests/basic +++ b/tests/basic @@ -54,6 +54,7 @@ ssh_test() { # kill the sshd process if it's still running kill "$SSHD_PID" + SSHD_PID= set -e @@ -87,9 +88,16 @@ cleanup() { echo "### removing temp dir..." rm -rf "$TEMPDIR" + if [ "$SSHD_PID" ] ; then + echo "### killing off lingering sshd..." + kill "$SSHD_PID" + fi + wait } +SSHD_PID= + ## setup trap trap failed_cleanup EXIT |