testing switching back to SSHD_PID, since the jobspec does not seem to work through...
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 26 Oct 2008 05:23:21 +0000 (01:23 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 26 Oct 2008 05:23:21 +0000 (01:23 -0400)
tests/basic

index a917f9f2657ec59fcd5e7465cf549251ae89c40c..a04cc0ef367d78a27ba5355d164ca836a18a08c1 100755 (executable)
@@ -26,9 +26,9 @@ cleanup() {
     echo
     read -p "press enter to cleanup and remove tmp:"
 
-    if ( jobs %1 >/dev/null 2>/dev/null ) ; then 
+    if ( ps $SSHD_PID >/dev/null ) ; then 
        echo "### stopping still-running sshd..."
-       kill %1
+       kill $SSHD_PID
     fi
 
     echo "### removing temp dir..."
@@ -124,6 +124,7 @@ EOF
 # launch test sshd with the new host key.
 echo "### starting sshd..."
 socat EXEC:"/usr/sbin/sshd -f ${SSHD_CONFIG} -i -d -d -d -D -e" "UNIX-LISTEN:${SOCKET}" 2> "$TEMPDIR"/sshd.log &
+export SSHD_PID=$!
 
 ### TESTUSER TESTS