]> granicus.if.org Git - apache/commitdiff
Bring back the hokey call to ap_create_tcp_socket() so mpmt_pthread
authorJeff Trawick <trawick@apache.org>
Fri, 23 Jun 2000 18:02:16 +0000 (18:02 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 23 Jun 2000 18:02:16 +0000 (18:02 +0000)
works again.  It is completely hosed at the moment.

Todo: remove the need for this call.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85675 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/mpmt_pthread/mpmt_pthread.c

index 5fe9a37f1e396e9adcb6ce142bdd2aa728323374..1268eefbc97126887e44d26535b75fe845b1475e 100644 (file)
@@ -736,7 +736,19 @@ static void child_main(int child_num_arg)
     /* Set up the pollfd array */
     listensocks = ap_pcalloc(pchild,
                            sizeof(*listensocks) * (num_listensocks + 1));
-    ap_put_os_sock(&listensocks[0], &pipe_of_death[0], pchild);
+
+    /* It is a horrible crime to use ap_create_tcp_socket() here, but it
+     * keeps ap_put_os_sock() from doing getsockname() on the pipe of death
+     * (which won't work).
+     * TODO - remove the need for such a hack!  Jeff owns this problem.
+     */
+    ap_create_tcp_socket(&listensocks[0], pchild);
+    rv = ap_put_os_sock(&listensocks[0], &pipe_of_death[0], pchild);
+    if (rv != APR_SUCCESS) {
+        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf,
+                     "ap_put_os_sock() failed for the pipe of death");
+        clean_child_exit(APEXIT_CHILDFATAL);
+    }
     for (lr = ap_listeners, i = 1; i <= num_listensocks; lr = lr->next, ++i)
        listensocks[i]=lr->sd;