From: Daniel Kahn Gillmor Date: Sun, 26 Oct 2008 05:14:49 +0000 (-0400) Subject: testing: only try to kill backgrounded sshd if process exists. X-Git-Tag: monkeysphere_0.16-1~10 X-Git-Url: https://codewiz.org/gitweb?p=monkeysphere.git;a=commitdiff_plain;h=af628454baaa110b31521a4d524d8690450defac testing: only try to kill backgrounded sshd if process exists. --- 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"