summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-10-26 01:14:49 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-10-26 01:14:49 -0400
commitaf628454baaa110b31521a4d524d8690450defac (patch)
treeb05fae5dc752323758e47ba9034f6078fbb13301 /tests
parent5e6fa0164c6003d09434e8e1b806a3d9ab8a2fcf (diff)
testing: only try to kill backgrounded sshd if process exists.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/basic6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/basic b/tests/basic
index cb3730d..a917f9f 100755
--- a/tests/basic
+++ b/tests/basic
@@ -26,8 +26,10 @@ cleanup() {
echo
read -p "press enter to cleanup and remove tmp:"
- echo "### stop sshd..."
- kill %1
+ if ( jobs %1 >/dev/null 2>/dev/null ) ; then
+ echo "### stopping still-running sshd..."
+ kill %1
+ fi
echo "### removing temp dir..."
rm -rf "$TEMPDIR"