diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2008-10-26 01:23:21 -0400 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2008-10-26 01:23:21 -0400 |
commit | 485b28a03e3f53361a4084921b1d3c68c0fda968 (patch) | |
tree | 68a99c481b95e2de619899a5cf58688c0f9031cb | |
parent | af628454baaa110b31521a4d524d8690450defac (diff) |
testing switching back to SSHD_PID, since the jobspec does not seem to work through a trap.
-rwxr-xr-x | tests/basic | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/basic b/tests/basic index a917f9f..a04cc0e 100755 --- a/tests/basic +++ b/tests/basic @@ -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 |