From 6291bfa3d60e3496eb2b88d9f6c310871b0fa41b Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Tue, 5 Feb 2002 06:16:04 +0000 Subject: [PATCH] This change keeps the server from allowing multiple instances to bind to the same port. Previously, this was necessary, because the Windows MPM was binding to the socket in both the parent and child. Today's code passes the attached socket to the child from the parent, so we don't need to re-attach in the child. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93248 13f79535-47bb-0310-9956-ffa450edef68 --- STATUS | 7 +------ server/listen.c | 9 --------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/STATUS b/STATUS index 473cf29a25..12c19dd83b 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2002/02/05 04:38:18 $] +Last modified at [$Date: 2002/02/05 06:16:03 $] Release: @@ -92,11 +92,6 @@ RELEASE SHOWSTOPPERS: * anon shared memory not allocating enough (fix is apr/shm/unix/shm.c 1.14) - * Win32 allows multiple processes to attach to the same port. This - means that I can open three DOS prompts, and run the same Apache - binary with the same config file three different times, and the - server won't complain. - * ap_directory_walk skips some per-dir config merge functions if there is no "" block in the configuration Message-ID: diff --git a/server/listen.c b/server/listen.c index b94f3f10ac..4f06f44e39 100644 --- a/server/listen.c +++ b/server/listen.c @@ -89,15 +89,6 @@ static apr_status_t make_sock(apr_pool_t *p, ap_listen_rec *server) int one = 1; apr_status_t stat; - stat = apr_setsocketopt(s, APR_SO_REUSEADDR, one); - if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) { - ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p, - "make_sock: for address %pI, setsockopt: (SO_REUSEADDR)", - server->bind_addr); - apr_socket_close(s); - return stat; - } - stat = apr_setsocketopt(s, APR_SO_KEEPALIVE, one); if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) { ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p, -- 2.40.0