diff options
author | 2011-05-31 02:03:34 +0000 | |
---|---|---|
committer | 2011-05-31 02:03:34 +0000 | |
commit | 30058d2ee55538049603a35594d5abfa6abb16cd (patch) | |
tree | 702084ea45376c259e7e08a62c064968a93e8ac3 | |
parent | back out revs 1.6 and 1.5 since it's not reliable (diff) | |
download | wireguard-openbsd-30058d2ee55538049603a35594d5abfa6abb16cd.tar.xz wireguard-openbsd-30058d2ee55538049603a35594d5abfa6abb16cd.zip |
work around startup and teardown races; caught by deraadt
-rw-r--r-- | regress/usr.bin/ssh/dynamic-forward.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/regress/usr.bin/ssh/dynamic-forward.sh b/regress/usr.bin/ssh/dynamic-forward.sh index 4be6bd93f8f..3054b697411 100644 --- a/regress/usr.bin/ssh/dynamic-forward.sh +++ b/regress/usr.bin/ssh/dynamic-forward.sh @@ -1,4 +1,4 @@ -# $OpenBSD: dynamic-forward.sh,v 1.7 2011/05/31 02:01:58 dtucker Exp $ +# $OpenBSD: dynamic-forward.sh,v 1.8 2011/05/31 02:03:34 dtucker Exp $ # Placed in the Public Domain. tid="dynamic forwarding" @@ -19,7 +19,8 @@ start_sshd for p in 1 2; do trace "start dynamic forwarding, fork to background" - ${SSH} -$p -F $OBJ/ssh_config -f -D $FWDPORT -q somehost \ + ${SSH} -$p -F $OBJ/ssh_config -f -D $FWDPORT -q \ + -oExitOnForwardFailure=yes somehost \ exec sh -c \'"echo \$\$ > $OBJ/remote_pid; exec sleep 444"\' for s in 4 5; do @@ -39,6 +40,7 @@ for p in 1 2; do if [ $remote -gt 1 ]; then kill -HUP $remote fi + sleep 1 else fail "no pid file: $OBJ/remote_pid" fi |