From: dtucker Date: Sat, 12 Nov 2005 10:30:07 +0000 (+0000) Subject: - (dtucker) [regress/reconfigure.sh] Fix potential race in the reconfigure X-Git-Tag: V_4_3_P1~128 X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/commitdiff_plain/29aaf112483bfac33084b413f9f270c1ae6f1d9c - (dtucker) [regress/reconfigure.sh] Fix potential race in the reconfigure test: if sshd takes too long to reconfigure the subsequent connection will fail. Zap pidfile before HUPing sshd which will rewrite it when it's ready. --- diff --git a/ChangeLog b/ChangeLog index d455003f..7ade4536 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ - (dtucker) [openbsd-compat/{realpath.c,stroll.c,rresvport.c}] $OpenBSD tag. - (dtucker) [configure.ac] Use "$AWK" instead of "awk" in gcc version test. - (dtucker) [configure.ac] Remove duplicate utimes() check. ok djm@ + - (dtucker) [regress/reconfigure.sh] Fix potential race in the reconfigure + test: if sshd takes too long to reconfigure the subsequent connection will + fail. Zap pidfile before HUPing sshd which will rewrite it when it's ready. 20051110 - (dtucker) [openbsd-compat/setenv.c] Merge changes for __findenv from diff --git a/regress/reconfigure.sh b/regress/reconfigure.sh index ba6dbc6f..1daf29f9 100644 --- a/regress/reconfigure.sh +++ b/regress/reconfigure.sh @@ -15,8 +15,9 @@ esac start_sshd -$SUDO kill -HUP `cat $PIDFILE` -sleep 1 +PID=`cat $PIDFILE` +rm -f $PIDFILE +$SUDO kill -HUP $PID trace "wait for sshd to restart" i=0;