]> granicus.if.org Git - apache/commitdiff
Changes to back out inherit flag from apr_os_sock_make()
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 18 Jul 2001 16:56:55 +0000 (16:56 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 18 Jul 2001 16:56:55 +0000 (16:56 +0000)
  and apr_socket_create()

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

server/listen.c
server/mpm/winnt/mpm_winnt.c
server/mpm_common.c
server/rfc1413.c
support/ab.c

index bdc777c588dc1e375140b1021bf644f3e8f8fd0d..12b270c86a0828f6cb45229eef1a3249ae5e32d6 100644 (file)
@@ -191,7 +191,7 @@ static void find_default_family(apr_pool_t *p)
     if (default_family == APR_UNSPEC) {
         apr_socket_t *tmp_sock;
 
-        if (apr_socket_create(&tmp_sock, APR_INET6, SOCK_STREAM, APR_INHERIT,
+        if (apr_socket_create(&tmp_sock, APR_INET6, SOCK_STREAM,
                               p) == APR_SUCCESS) {
             apr_socket_close(tmp_sock);
             default_family = APR_INET6;
@@ -254,11 +254,12 @@ static void alloc_listener(process_rec *process, char *addr, apr_port_t port)
         return;
     }
     if ((status = apr_socket_create(&new->sd, new->bind_addr->sa.sin.sin_family, 
-                                    SOCK_STREAM, APR_INHERIT, process->pool)) != APR_SUCCESS) {
+                                    SOCK_STREAM, process->pool)) != APR_SUCCESS) {
         ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool,
                      "alloc_listener: failed to get a socket for %s", addr);
         return;
     }
+    apr_socket_inherit_set();
     new->next = ap_listeners;
     ap_listeners = new;
 }
index a2f14253ed17ba65c6304e19ca011adeeb460487..901b5ba2060bf43062c1acdf7762806c44df4925 100644 (file)
@@ -899,7 +899,7 @@ static void worker_main(int thread_num)
         sockinfo.family  = APR_INET;
         sockinfo.type    = SOCK_STREAM;
         /* ### is this correct?  Shouldn't be inheritable (at this point) */
-        apr_os_sock_make(&context->sock, &sockinfo, APR_NO_INHERIT, context->ptrans);
+        apr_os_sock_make(&context->sock, &sockinfo, context->ptrans);
 
         c = ap_new_connection(context->ptrans, server_conf, context->sock,
                               thread_num);
index beba575bf8d4a2cfdc9c20353368e539036e8088..006d813341d959361a8b21b6d41dc70b1c9a9b93 100644 (file)
@@ -403,7 +403,7 @@ AP_DECLARE(apr_status_t) ap_mpm_pod_signal(ap_pod_t *pod)
     }
     
     apr_sockaddr_info_get(&sa, "127.0.0.1", APR_UNSPEC, ap_listeners->bind_addr->port, 0, pod->p);
-    rv = apr_socket_create(&sock, sa->family, SOCK_STREAM, APR_NO_INHERIT, pod->p);
+    rv = apr_socket_create(&sock, sa->family, SOCK_STREAM, pod->p);
     if (rv != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
                      "get socket to connect to listener");
index 41619b19c288310bbdcfcab021b158dad3d1bfe0..669c9e97c64c032a75ddce601de99d890b723dee 100644 (file)
@@ -141,7 +141,7 @@ static apr_status_t rfc1413_connect(apr_socket_t **newsock, conn_rec *conn,
 
     if ((rv = apr_socket_create(newsock, 
                                 localsa->sa.sin.sin_family, /* has to match */
-                                SOCK_STREAM, APR_NO_INHERIT, conn->pool)) != APR_SUCCESS) {
+                                SOCK_STREAM, conn->pool)) != APR_SUCCESS) {
        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
                      "rfc1413: error creating query socket");
         return rv;
index 0ff1cec32114ad4d38ac6e662b0f2b191023c8b6..43d47c632a5f8d2d8cbc2132eb0b616e0050713d 100644 (file)
@@ -844,7 +844,7 @@ static void start_connect(struct connection * c)
        apr_err(buf, rv);
     }
     if ((rv = apr_socket_create(&c->aprsock, destsa->sa.sin.sin_family,
-                               SOCK_STREAM, APR_NO_INHERIT, cntxt)) != APR_SUCCESS) {
+                               SOCK_STREAM, cntxt)) != APR_SUCCESS) {
        apr_err("socket", rv);
     }
     c->start = apr_time_now();
@@ -1289,14 +1289,14 @@ static void test(void)
 static void copyright(void)
 {
     if (!use_html) {
-       printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.73 $> apache-2.0");
+       printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.74 $> apache-2.0");
        printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
        printf("Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/\n");
        printf("\n");
     }
     else {
        printf("<p>\n");
-       printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.73 $");
+       printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.74 $");
        printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
        printf(" Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/<br>\n");
        printf("</p>\n<p>\n");