From: Jeff Trawick Date: Mon, 19 Aug 2013 11:37:24 +0000 (+0000) Subject: fcgistarter: Specify SO_REUSEADDR to allow starting a server X-Git-Tag: 2.4.7~290 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c40535bf5ac3677c2cabc8d804c5e96b2f06900;p=apache fcgistarter: Specify SO_REUSEADDR to allow starting a server with old connections in TIME_WAIT. Submitted by: trawick Reviewed by: covener, sf git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1515367 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index f2a42c46b4..b02ee0b743 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.4.7 + *) fcgistarter: Specify SO_REUSEADDR to allow starting a server + with old connections in TIME_WAIT. [Jeff Trawick] + *) core: Add open_htaccess hook which, in conjunction with dirwalk_stat and post_perdir_config (introduced in 2.4.5), allows mpm-itk to be used without patches to httpd core. [Stefan Fritsch] diff --git a/STATUS b/STATUS index d3a412d681..10d893d03a 100644 --- a/STATUS +++ b/STATUS @@ -127,12 +127,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: 2.4.x patch: trunk patch works +1: jim, druggeri, sf - * fcgistarter: Specify SO_REUSEADDR to allow starting a server with old - connections in TIME_WAIT. - trunk: http://svn.apache.org/r1515050 - 2.4.x patch: trunk patch works - +1: trawick, covener, sf - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/support/fcgistarter.c b/support/fcgistarter.c index 2e2c3e5662..9cfda51a09 100644 --- a/support/fcgistarter.c +++ b/support/fcgistarter.c @@ -133,6 +133,11 @@ int main(int argc, const char * const argv[]) exit_error(rv, "apr_socket_create"); } + rv = apr_socket_opt_set(skt, APR_SO_REUSEADDR, 1); + if (rv) { + exit_error(rv, "apr_socket_opt_set(APR_SO_REUSEADDR)"); + } + rv = apr_socket_bind(skt, skaddr); if (rv) { exit_error(rv, "apr_socket_bind");