OPENSSL-LISTEN in write-only context failed with Bad file descriptor

This commit is contained in:
Gerhard Rieger 2013-06-22 19:29:47 +02:00
parent 63bf093949
commit a105208cd9
2 changed files with 4 additions and 1 deletions

View file

@ -233,6 +233,9 @@ corrections:
Compilation failed under some non-Linux operating systems due to use
of old rfd1 component
OPENSSL-LISTEN failed with "Bad file descriptor" when used in
write-only context
porting:
Red Hat issue 1020203: configure checks fail with some compilers.
Use case: clang

View file

@ -629,7 +629,7 @@ static int
if (portname) {
/* tcp listen; this can fork() for us; it only returns on error or on
successful establishment of tcp connection */
result = _xioopen_listen(xfd, xioflags,
result = _xioopen_listen(xfd, (xioflags&~XIO_ACCMODE)|XIO_RDWR,
(struct sockaddr *)us, uslen,
opts, pf, socktype, IPPROTO_TCP,
#if WITH_RETRY