summaryrefslogtreecommitdiff
path: root/regress/test-exec.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r--regress/test-exec.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index aac8aa5c..a1bab832 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: test-exec.sh,v 1.47 2013/11/09 05:41:34 dtucker Exp $
+# $OpenBSD: test-exec.sh,v 1.48 2014/07/06 07:42:03 djm Exp $
# Placed in the Public Domain.
#SUDO=sudo
@@ -240,13 +240,20 @@ md5 () {
# helper
cleanup ()
{
+ if [ "x$SSH_PID" != "x" ]; then
+ if [ $SSH_PID -lt 2 ]; then
+ echo bad pid for ssh: $SSH_PID
+ else
+ kill $SSH_PID
+ fi
+ fi
if [ -f $PIDFILE ]; then
pid=`$SUDO cat $PIDFILE`
if [ "X$pid" = "X" ]; then
echo no sshd running
else
if [ $pid -lt 2 ]; then
- echo bad pid for ssh: $pid
+ echo bad pid for sshd: $pid
else
$SUDO kill $pid
trace "wait for sshd to exit"