Address FD was not read from when used bidirectionally

This commit is contained in:
Gerhard Rieger 2015-04-03 15:29:13 +02:00
parent ce3714c553
commit af241ab40f
3 changed files with 16 additions and 3 deletions

View file

@ -239,6 +239,9 @@ corrections:
UDP-LISTEN failed with "...is not available". Thanks to Fred for
reporting this problem
Address FD was not read from when used bidirectionally. Thanks to David
Halls for reporting this bug.
porting:
Red Hat issue 1020203: configure checks fail with some compilers.
Use case: clang

14
test.sh
View file

@ -3968,7 +3968,7 @@ testchain "$N" "$TEST" "test|^test|test|^test|test|^test|test|^test|stdio" "pipe
esac
N=$((N+1))
NAME=TOWLONGCHAINS
NAME=TWOLONGCHAINS
case "$TESTS" in
*%$N%*|*%functions%*|*%chain%*|*%$NAME%*)
TEST="$NAME: four-tests+stdio vs. four-tests+pipe"
@ -12645,7 +12645,17 @@ esac
N=$((N+1))
echo "summary: $((N-1)) tests, $((numOK+numFAILED+numCANT)) selected; $numOK ok, $numFAIL failed, $numCANT could not be performed"
NAME=FD_BI_WRITE
case "$TESTS" in
*%$N%*|*%functions%*|*%chain%*|*%$NAME%*)
TEST="$NAME: FD address in birectional context is"
testecho "$N" "$TEST" "FD:0" "FD:1" "-T 2 $opts" "$val_t"
esac
N=$((N+1))
echo "summary: $((N-1)) tests, $((numOK+numFAIL+numCANT)) selected; $numOK ok, $numFAIL failed, $numCANT could not be performed"
if [ "$numFAIL" -gt 0 ]; then
echo "FAILED: $listFAIL"

View file

@ -61,8 +61,8 @@ static int xioopen_fdnum(int argc, const char *argv[], struct opt *opts,
}
} else {
if (XIOWITHWR(rw)) {
numrfd = numfd1;
numwfd = numfd1;
numrfd = -1;
} else {
numrfd = numfd1;
numwfd = -1;