While accept() is inheriting O_NONBLOCK it is not the case in the accept4()
case. So only inherit O_NONBLOCK if accept4() is not used. Without this apache 2.4 blocks forever when using keepalive. OK stsp@
This commit is contained in:
parent
807e56a6fc
commit
586435cfb6
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.35 2015/01/10 19:22:16 stsp Exp $
|
||||
# $OpenBSD: Makefile,v 1.36 2015/01/18 21:27:08 claudio Exp $
|
||||
|
||||
COMMENT= Apache Portable Runtime
|
||||
|
||||
V= 1.5.0
|
||||
REVISION= 0
|
||||
REVISION= 1
|
||||
DISTNAME= apr-$V
|
||||
SHARED_LIBS += apr-1 5.0 # .5.0
|
||||
|
||||
|
@ -1,6 +1,15 @@
|
||||
$OpenBSD: patch-network_io_unix_sockets_c,v 1.4 2012/04/28 09:48:20 stsp Exp $
|
||||
--- network_io/unix/sockets.c.orig Wed Mar 23 19:52:44 2011
|
||||
+++ network_io/unix/sockets.c Fri Apr 27 09:51:08 2012
|
||||
$OpenBSD: patch-network_io_unix_sockets_c,v 1.5 2015/01/18 21:27:08 claudio Exp $
|
||||
--- network_io/unix/sockets.c.orig Wed Mar 23 19:50:21 2011
|
||||
+++ network_io/unix/sockets.c Wed Jan 14 23:43:33 2015
|
||||
@@ -271,7 +271,7 @@ apr_status_t apr_socket_accept(apr_socket_t **new, apr
|
||||
apr_set_option(*new, APR_TCP_NODELAY, 1);
|
||||
}
|
||||
#endif /* TCP_NODELAY_INHERITED */
|
||||
-#if APR_O_NONBLOCK_INHERITED
|
||||
+#if APR_O_NONBLOCK_INHERITED && !defined(HAVE_ACCEPT4)
|
||||
if (apr_is_option_set(sock, APR_SO_NONBLOCK) == 1) {
|
||||
apr_set_option(*new, APR_SO_NONBLOCK, 1);
|
||||
}
|
||||
@@ -312,6 +312,15 @@ apr_status_t apr_socket_accept(apr_socket_t **new, apr
|
||||
apr_status_t apr_socket_connect(apr_socket_t *sock, apr_sockaddr_t *sa)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user