diff options
author | Jeff Trawick <trawick@apache.org> | 2011-04-12 16:15:27 +0200 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2011-04-12 16:15:27 +0200 |
commit | 51ad225698aeb18b19cf58cc20b1f266a2e6ce85 (patch) | |
tree | 7239d11940266a5f4e047ecfd1ebd56393dfac51 /server/mpm/winnt/mpm_winnt.c | |
parent | Allow apr and apr-util to be in 2 different location. (diff) | |
download | apache2-51ad225698aeb18b19cf58cc20b1f266a2e6ce85.tar.xz apache2-51ad225698aeb18b19cf58cc20b1f266a2e6ce85.zip |
add some debug logging to show more information about passing of sockets
between parent and child
the extra info is helpful when using a generic listener on an IPv6-
enabled box when either IPV6_V6ONLY isn't defined for the APR build
or httpd is built with IPv4-mapped addresses enabled
in that case you'll see the parent writing one socket but the child
expecting too, before it bails out with
(OS 109)The pipe has been ended. : Child: Unable to read socket data
from parent
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1091421 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | server/mpm/winnt/mpm_winnt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index fc10a8e379..777f0e57ab 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -432,6 +432,9 @@ static void get_listeners_from_parent(server_rec *s) * pipe = GetStdHandle(STD_INPUT_HANDLE); */ for (lr = ap_listeners; lr; lr = lr->next, ++lcnt) { + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, + "Child: Waiting for data for listening socket %pI", + lr->bind_addr); if (!ReadFile(pipe, &WSAProtocolInfo, sizeof(WSAPROTOCOL_INFO), &BytesRead, (LPOVERLAPPED) NULL)) { ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, @@ -477,8 +480,8 @@ static int send_listeners_to_child(apr_pool_t *p, DWORD dwProcessId, lpWSAProtocolInfo = apr_pcalloc(p, sizeof(WSAPROTOCOL_INFO)); apr_os_sock_get(&nsd, lr->sd); ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, ap_server_conf, - "Parent: Duplicating socket %d and sending it to child process %lu", - nsd, dwProcessId); + "Parent: Duplicating socket %d (%pI) and sending it to child process %lu", + nsd, lr->bind_addr, dwProcessId); if (WSADuplicateSocket(nsd, dwProcessId, lpWSAProtocolInfo) == SOCKET_ERROR) { ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_netos_error(), ap_server_conf, |