diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2017-07-28 10:32:08 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2017-09-18 14:11:22 +1000 |
commit | 239c57d5bc2253e27e3e6ad7ac52ec8c377ee24e (patch) | |
tree | 747bcddba3ae0f3d146468a5dbeb1cb8a0801775 /regress | |
parent | aea59a0d9f120f2a87c7f494a0d9c51eaa79b8ba (diff) |
upstream commit
Don't call fatal from stop_sshd since it calls cleanup
which calls stop_sshd which will probably fail in the same way. Instead,
just bail. Differentiate between sshd dying without cleanup and not shutting
down.
Upstream-Regress-ID: f97315f538618b349e2b0bea02d6b0c9196c6bc4
Diffstat (limited to 'regress')
-rw-r--r-- | regress/test-exec.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh index 1480f13fc..68f010b70 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: test-exec.sh,v 1.60 2017/04/30 23:34:55 djm Exp $ | 1 | # $OpenBSD: test-exec.sh,v 1.61 2017/07/28 10:32:08 dtucker Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | #SUDO=sudo | 4 | #SUDO=sudo |
@@ -304,8 +304,15 @@ stop_sshd () | |||
304 | i=`expr $i + 1` | 304 | i=`expr $i + 1` |
305 | sleep $i | 305 | sleep $i |
306 | done | 306 | done |
307 | test -f $PIDFILE && \ | 307 | if test -f $PIDFILE; then |
308 | fatal "sshd didn't exit port $PORT pid $pid" | 308 | if $SUDO kill -0 $pid; then |
309 | echo "sshd didn't exit " \ | ||
310 | "port $PORT pid $pid" | ||
311 | else | ||
312 | echo "sshd died without cleanup" | ||
313 | fi | ||
314 | exit 1 | ||
315 | fi | ||
309 | fi | 316 | fi |
310 | fi | 317 | fi |
311 | fi | 318 | fi |