- (djm) [regress/multiplex.sh] Use -d (detach stdin) flag to disassociate

nc from stdin, it's more portable
This commit is contained in:
Damien Miller 2014-08-01 13:31:52 +10:00
parent 5b3879fd4b
commit f8988fbef0
2 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,8 @@
a better solution, but this will have to do for now.
- (djm) [regress/multiplex.sh] Instruct nc not to quit as soon as stdin
is closed; avoid regress failures when stdin is /dev/null
- (djm) [regress/multiplex.sh] Use -d (detach stdin) flag to disassociate
nc from stdin, it's more portable
20140730
- OpenBSD CVS Sync

View File

@ -93,7 +93,7 @@ trace "forward over TCP/IP and check result"
$NC -l 127.0.0.1 $((${PORT} + 1)) < ${DATA} &
netcat_pid=$!
${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L127.0.0.1:$((${PORT} + 2)):127.0.0.1:$((${PORT} + 1)) otherhost >>$TEST_SSH_LOGFILE 2>&1
$NC -q5 127.0.0.1 $((${PORT} + 2)) > ${COPY} < /dev/null
$NC -d 127.0.0.1 $((${PORT} + 2)) > ${COPY} < /dev/null
cmp ${DATA} ${COPY} || fail "ssh: corrupted copy of ${DATA}"
kill $netcat_pid 2>/dev/null
rm -f ${COPY} $OBJ/unix-[123].fwd
@ -103,7 +103,7 @@ $NC -Ul $OBJ/unix-1.fwd < ${DATA} &
netcat_pid=$!
${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L$OBJ/unix-2.fwd:$OBJ/unix-1.fwd otherhost >>$TEST_SSH_LOGFILE 2>&1
${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R$OBJ/unix-3.fwd:$OBJ/unix-2.fwd otherhost >>$TEST_SSH_LOGFILE 2>&1
$NC -q5 -U $OBJ/unix-3.fwd > ${COPY} </dev/null
$NC -d -U $OBJ/unix-3.fwd > ${COPY} </dev/null
cmp ${DATA} ${COPY} || fail "ssh: corrupted copy of ${DATA}"
kill $netcat_pid 2>/dev/null
rm -f ${COPY} $OBJ/unix-[123].fwd