testing: using jobspec instead of SSHD_PID
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 26 Oct 2008 05:12:05 +0000 (01:12 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 26 Oct 2008 05:12:05 +0000 (01:12 -0400)
tests/basic

index 30c6d17aba096e5e1b136ab0eae123ec5d407c23..cb3730daddc27bef1cfddaebbf77f5858d31a959 100755 (executable)
@@ -27,10 +27,12 @@ cleanup() {
     read -p "press enter to cleanup and remove tmp:"
 
     echo "### stop sshd..."
-    kill "$SSHD_PID"
+    kill %1
 
     echo "### removing temp dir..."
     rm -rf "$TEMPDIR"
+
+    wait
 }
 
 ## setup trap
@@ -120,8 +122,6 @@ 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