From af628454baaa110b31521a4d524d8690450defac Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Sun, 26 Oct 2008 01:14:49 -0400 Subject: [PATCH] testing: only try to kill backgrounded sshd if process exists. --- tests/basic | 6 ++++-- 1 file 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" -- 2.25.1