You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ian Holsman <ia...@cnet.com> on 2001/07/16 19:19:29 UTC

Re: cvs commit: httpd-2.0/support ab.c

hi Ryan.
just patching up the proxy code at the moment,
should I be using APR_INHERIT there? does it really matter?
as the socket being created is in a child which won't spawn any more
processes?

On 16 Jul 2001 16:11:05 +0000, rbb@apache.org wrote:
> rbb         01/07/16 09:11:05
> 
>   Modified:    server   listen.c mpm_common.c rfc1413.c
>                .        CHANGES
>                include  apr_network_io.h apr_portable.h
>                include/arch/unix networkio.h
>                network_io/unix sockets.c
>                test     client.c sendfile.c server.c testpoll.c
>                         testsockets.c testsockopt.c
>                support  ab.c
>   Added:       include  apr_inherit.h
>   Log:
>   Added an inherit flag to apr_socket_create and other socket creation
>   functions.  This allows APR programs to specify that a socket should
>   be passed to any child processes that are created.  The inherit flag
>   is only meaningful if programs use apr_process_create().  This
>   also adds a couple of macros that allow APR types to set and unset
>   the inherit flag.
>   
>   This also fixes Apache to use the new API.
>   
>   Revision  Changes    Path
>   1.54      +2 -2      httpd-2.0/server/listen.c
>   
>   Index: listen.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/server/listen.c,v
>   retrieving revision 1.53
>   retrieving revision 1.54
>   diff -u -r1.53 -r1.54
>   --- listen.c	2001/04/05 19:04:14	1.53
>   +++ listen.c	2001/07/16 16:11:03	1.54
>   @@ -191,7 +191,7 @@
>        if (default_family == APR_UNSPEC) {
>            apr_socket_t *tmp_sock;
>    
>   -        if (apr_socket_create(&tmp_sock, APR_INET6, SOCK_STREAM, 
>   +        if (apr_socket_create(&tmp_sock, APR_INET6, SOCK_STREAM, APR_INHERIT,
>                                  p) == APR_SUCCESS) {
>                apr_socket_close(tmp_sock);
>                default_family = APR_INET6;
>   @@ -254,7 +254,7 @@
>            return;
>        }
>        if ((status = apr_socket_create(&new->sd, new->bind_addr->sa.sin.sin_family, 
>   -                                    SOCK_STREAM, process->pool)) != APR_SUCCESS) {
>   +                                    SOCK_STREAM, APR_INHERIT, 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;
>   
>   
>   
>   1.56      +1 -1      httpd-2.0/server/mpm_common.c
>   
>   Index: mpm_common.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/server/mpm_common.c,v
>   retrieving revision 1.55
>   retrieving revision 1.56
>   diff -u -r1.55 -r1.56
>   --- mpm_common.c	2001/07/11 14:48:23	1.55
>   +++ mpm_common.c	2001/07/16 16:11:03	1.56
>   @@ -403,7 +403,7 @@
>        }
>        
>        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, pod->p);
>   +    rv = apr_socket_create(&sock, sa->family, SOCK_STREAM, APR_NO_INHERIT, pod->p);
>        if (rv != APR_SUCCESS) {
>            ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
>                         "get socket to connect to listener");
>   
>   
>   
>   1.41      +2 -1      httpd-2.0/server/rfc1413.c
>   
>   Index: rfc1413.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/server/rfc1413.c,v
>   retrieving revision 1.40
>   retrieving revision 1.41
>   diff -u -r1.40 -r1.41
>   --- rfc1413.c	2001/04/10 20:41:45	1.40
>   +++ rfc1413.c	2001/07/16 16:11:03	1.41
>   @@ -83,6 +83,7 @@
>    #include "apr_network_io.h"
>    #include "apr_strings.h"
>    #include "apr_lib.h"
>   +#include "apr_inherit.h"
>    
>    #define APR_WANT_STDIO
>    #define APR_WANT_STRFUNC
>   @@ -140,7 +141,7 @@
>    
>        if ((rv = apr_socket_create(newsock, 
>                                    localsa->sa.sin.sin_family, /* has to match */
>   -                                SOCK_STREAM, conn->pool)) != APR_SUCCESS) {
>   +                                SOCK_STREAM, APR_NO_INHERIT, conn->pool)) != APR_SUCCESS) {
>    	ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
>                         "rfc1413: error creating query socket");
>            return rv;
>   
>   
>   
>   1.120     +7 -0      apr/CHANGES
>   
>   Index: CHANGES
>   ===================================================================
>   RCS file: /home/cvs/apr/CHANGES,v
>   retrieving revision 1.119
>   retrieving revision 1.120
>   diff -u -r1.119 -r1.120
>   --- CHANGES	2001/07/11 18:41:29	1.119
>   +++ CHANGES	2001/07/16 16:11:03	1.120
>   @@ -1,5 +1,12 @@
>    Changes with APR b1  
>    
>   +  *) Added an inherit flag to apr_socket_create and other socket creation
>   +     functions.  This allows APR programs to specify that a socket should
>   +     be passed to any child processes that are created.  The inherit flag
>   +     is only meaningful if programs use apr_process_create().  This
>   +     also adds a couple of macros that allow APR types to set and unset
>   +     the inherit flag.  [Ryan Bloom]
>   +
>      *) apr_connect()on Windows: Handle timeouts and returning the proper
>         status code when a connect is in progress. [Bill Stoddard]
>    
>   
>   
>   
>   1.103     +5 -1      apr/include/apr_network_io.h
>   
>   Index: apr_network_io.h
>   ===================================================================
>   RCS file: /home/cvs/apr/include/apr_network_io.h,v
>   retrieving revision 1.102
>   retrieving revision 1.103
>   diff -u -r1.102 -r1.103
>   --- apr_network_io.h	2001/05/02 02:32:44	1.102
>   +++ apr_network_io.h	2001/07/16 16:11:03	1.103
>   @@ -63,6 +63,7 @@
>    #include "apr_pools.h"
>    #include "apr_file_io.h"
>    #include "apr_errno.h"
>   +#include "apr_inherit.h" 
>    
>    #if APR_HAVE_NETINET_IN_H
>    #include <netinet/in.h>
>   @@ -240,12 +241,13 @@
>     * @param new_sock The new socket that has been set up.
>     * @param family The address family of the socket (e.g., APR_INET).
>     * @param type The type of the socket (e.g., SOCK_STREAM).
>   + * @param inherit Should this socket be inherited by child processes
>     * @param cont The pool to use
>     * @deffunc apr_status_t apr_socket_create(apr_socket_t **new_sock, int family, int type, apr_pool_t *cont)
>     */
>    APR_DECLARE(apr_status_t) apr_socket_create(apr_socket_t **new_sock, 
>                                                int family, int type,
>   -                                            apr_pool_t *cont);
>   +                                            int inherit, apr_pool_t *cont);
>    
>    /**
>     * Shutdown either reading, writing, or both sides of a tcp socket.
>   @@ -800,6 +802,8 @@
>    apr_status_t apr_socket_accept_filter(apr_socket_t *sock, char name[16],
>                                          char args[256 - 16]);
>    #endif
>   +
>   +APR_DECLARE_SET_INHERIT(socket);
>    
>    #ifdef __cplusplus
>    }
>   
>   
>   
>   1.63      +2 -0      apr/include/apr_portable.h
>   
>   Index: apr_portable.h
>   ===================================================================
>   RCS file: /home/cvs/apr/include/apr_portable.h,v
>   retrieving revision 1.62
>   retrieving revision 1.63
>   diff -u -r1.62 -r1.63
>   --- apr_portable.h	2001/07/07 16:45:08	1.62
>   +++ apr_portable.h	2001/07/16 16:11:03	1.63
>   @@ -321,6 +321,7 @@
>     * @param apr_sock The new socket that has been set up
>     * @param os_sock_info The os representation of the socket handle and
>     *        other characteristics of the socket
>   + * @param inherit Should this socket be inherited by child processes
>     * @param cont The pool to use
>     * @deffunc apr_status_t apr_os_sock_make(apr_socket_t **apr_sock, apr_os_sock_info_t *os_sock_info, apr_pool_t *cont)
>     * @tip If you only know the descriptor/handle or if it isn't really
>   @@ -328,6 +329,7 @@
>     */
>    APR_DECLARE(apr_status_t) apr_os_sock_make(apr_socket_t **apr_sock,
>                                               apr_os_sock_info_t *os_sock_info,
>   +                                           int inherit,
>                                               apr_pool_t *cont);
>    
>    /**
>   
>   
>   
>   1.1                  apr/include/apr_inherit.h
>   
>   Index: apr_inherit.h
>   ===================================================================
>   /* ====================================================================
>    * The Apache Software License, Version 1.1
>    *
>    * Copyright (c) 2000-2001 The Apache Software Foundation.  All rights
>    * reserved.
>    *
>    * Redistribution and use in source and binary forms, with or without
>    * modification, are permitted provided that the following conditions
>    * are met:
>    *
>    * 1. Redistributions of source code must retain the above copyright
>    *    notice, this list of conditions and the following disclaimer.
>    *
>    * 2. Redistributions in binary form must reproduce the above copyright
>    *    notice, this list of conditions and the following disclaimer in
>    *    the documentation and/or other materials provided with the
>    *    distribution.
>    *
>    * 3. The end-user documentation included with the redistribution,
>    *    if any, must include the following acknowledgment:
>    *       "This product includes software developed by the
>    *        Apache Software Foundation (http://www.apache.org/)."
>    *    Alternately, this acknowledgment may appear in the software itself,
>    *    if and wherever such third-party acknowledgments normally appear.
>    *
>    * 4. The names "Apache" and "Apache Software Foundation" must
>    *    not be used to endorse or promote products derived from this
>    *    software without prior written permission. For written
>    *    permission, please contact apache@apache.org.
>    *
>    * 5. Products derived from this software may not be called "Apache",
>    *    nor may "Apache" appear in their name, without prior written
>    *    permission of the Apache Software Foundation.
>    *
>    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
>    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
>    * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
>    * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
>    * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
>    * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
>    * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
>    * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
>    * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
>    * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
>    * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
>    * SUCH DAMAGE.
>    * ====================================================================
>    *
>    * This software consists of voluntary contributions made by many
>    * individuals on behalf of the Apache Software Foundation.  For more
>    * information on the Apache Software Foundation, please see
>    * <http://www.apache.org/>.
>    */
>   
>   #ifndef APR_INHERIT_H
>   #define APR_INHERIT_H
>   
>   #ifdef __cplusplus
>   extern "C" {
>   #endif /* __cplusplus */
>   
>   #define APR_NO_INHERIT 0
>   #define APR_INHERIT    1
>   
>   #define APR_DECLARE_SET_INHERIT(name) \
>       void apr_##name##_set_inherit(apr_##name##_t *name)
>   
>   #define APR_SET_INHERIT(name, pool, cleanup, field_exists)          \
>   void apr_##name##_set_inherit(apr_##name##_t *name)                 \
>   {                                                                   \
>       name->inherit = 1;                                              \
>       apr_pool_cleanup_register(name->##pool, (void *)##name##, NULL, \
>                                 cleanup);                             \
>   }
>   
>   #define APR_DECLARE_UNSET_INHERIT(name) \
>       void apr_##name##_unset_inherit(apr_##name##_t *name)
>   
>   #define APR_UNSET_INHERIT(name, pool, cleanup, field_exists)          \
>   void apr_##name##_unset_inherit(apr_##name##_t *name)                 \
>   {                                                                   \
>       name->inherit = 0;                                              \
>       apr_pool_cleanup_kill(name->##pool, (void *)##name##, NULL, \
>                                 cleanup);                             \
>   }
>   
>   #ifdef __cplusplus
>   }
>   #endif
>   
>   #endif	/* ! APR_INHERIT_H */
>   
>   
>   
>   1.47      +1 -0      apr/include/arch/unix/networkio.h
>   
>   Index: networkio.h
>   ===================================================================
>   RCS file: /home/cvs/apr/include/arch/unix/networkio.h,v
>   retrieving revision 1.46
>   retrieving revision 1.47
>   diff -u -r1.46 -r1.47
>   --- networkio.h	2001/07/10 15:01:33	1.46
>   +++ networkio.h	2001/07/16 16:11:04	1.47
>   @@ -135,6 +135,7 @@
>        int local_port_unknown;
>        int local_interface_unknown;
>        apr_int32_t netmask;
>   +    int inherit;
>    };
>    
>    struct apr_pollfd_t {
>   
>   
>   
>   1.77      +11 -4     apr/network_io/unix/sockets.c
>   
>   Index: sockets.c
>   ===================================================================
>   RCS file: /home/cvs/apr/network_io/unix/sockets.c,v
>   retrieving revision 1.76
>   retrieving revision 1.77
>   diff -u -r1.76 -r1.77
>   --- sockets.c	2001/07/10 17:18:55	1.76
>   +++ sockets.c	2001/07/16 16:11:04	1.77
>   @@ -53,7 +53,9 @@
>     */
>    
>    #include "networkio.h"
>   +#include "apr_network_io.h"
>    #include "apr_portable.h"
>   +#include "apr_inherit.h"
>    
>    static apr_status_t socket_cleanup(void *sock)
>    {
>   @@ -125,7 +127,7 @@
>    }
>    
>    apr_status_t apr_socket_create(apr_socket_t **new, int ofamily, int type,
>   -                               apr_pool_t *cont)
>   +                               int inherit, apr_pool_t *cont)
>    {
>        int family = ofamily;
>    
>   @@ -158,8 +160,9 @@
>        set_socket_vars(*new, family, type);
>    
>        (*new)->timeout = -1;
>   +    (*new)->inherit = inherit;
>        apr_pool_cleanup_register((*new)->cntxt, (void *)(*new), 
>   -                        socket_cleanup, apr_pool_cleanup_null);
>   +                        socket_cleanup, inherit ? socket_cleanup : NULL );
>        return APR_SUCCESS;
>    } 
>    
>   @@ -250,8 +253,9 @@
>            (*new)->local_interface_unknown = 1;
>        }
>    
>   +    (*new)->inherit = sock->inherit;
>        apr_pool_cleanup_register((*new)->cntxt, (void *)(*new), 
>   -                        socket_cleanup, apr_pool_cleanup_null);
>   +                        socket_cleanup, (*new)->inherit ? socket_cleanup : NULL);
>        return APR_SUCCESS;
>    }
>    
>   @@ -328,6 +332,7 @@
>    
>    apr_status_t apr_os_sock_make(apr_socket_t **apr_sock, 
>                                  apr_os_sock_info_t *os_sock_info, 
>   +                              int inherit,
>                                  apr_pool_t *cont)
>    {
>        alloc_socket(apr_sock, cont);
>   @@ -351,8 +356,9 @@
>                   (*apr_sock)->remote_addr->salen);
>        }
>            
>   +    (*apr_sock)->inherit = inherit;
>        apr_pool_cleanup_register((*apr_sock)->cntxt, (void *)(*apr_sock), 
>   -                        socket_cleanup, apr_pool_cleanup_null);
>   +                        socket_cleanup, inherit ? socket_cleanup : NULL);
>    
>        return APR_SUCCESS;
>    }
>   @@ -373,3 +379,4 @@
>        return APR_SUCCESS;
>    }
>    
>   +APR_SET_INHERIT(socket, cntxt, socket_cleanup, 1)
>   
>   
>   
>   1.31      +1 -1      apr/test/client.c
>   
>   Index: client.c
>   ===================================================================
>   RCS file: /home/cvs/apr/test/client.c,v
>   retrieving revision 1.30
>   retrieving revision 1.31
>   diff -u -r1.30 -r1.31
>   --- client.c	2001/07/10 15:01:43	1.30
>   +++ client.c	2001/07/16 16:11:04	1.31
>   @@ -110,7 +110,7 @@
>        fprintf(stdout,"OK\n");
>    
>        fprintf(stdout, "\tClient:  Creating new socket.......");
>   -    if (apr_socket_create(&sock, remote_sa->family, SOCK_STREAM,
>   +    if (apr_socket_create(&sock, remote_sa->family, SOCK_STREAM, APR_NO_INHERIT,
>                              context) != APR_SUCCESS) {
>            fprintf(stderr, "Couldn't create socket\n");
>            exit(-1);
>   
>   
>   
>   1.15      +1 -1      apr/test/sendfile.c
>   
>   Index: sendfile.c
>   ===================================================================
>   RCS file: /home/cvs/apr/test/sendfile.c,v
>   retrieving revision 1.14
>   retrieving revision 1.15
>   diff -u -r1.14 -r1.15
>   --- sendfile.c	2001/06/08 04:49:44	1.14
>   +++ sendfile.c	2001/07/16 16:11:05	1.15
>   @@ -114,7 +114,7 @@
>        }
>    
>        *sock = NULL;
>   -    rv = apr_socket_create(sock, *family, SOCK_STREAM, *p);
>   +    rv = apr_socket_create(sock, *family, SOCK_STREAM, APR_NO_INHERIT, *p);
>        if (rv != APR_SUCCESS) {
>            fprintf(stderr, "apr_socket_create()->%d/%s\n",
>                    rv,
>   
>   
>   
>   1.29      +1 -1      apr/test/server.c
>   
>   Index: server.c
>   ===================================================================
>   RCS file: /home/cvs/apr/test/server.c,v
>   retrieving revision 1.28
>   retrieving revision 1.29
>   diff -u -r1.28 -r1.29
>   --- server.c	2001/06/08 04:49:44	1.28
>   +++ server.c	2001/07/16 16:11:05	1.29
>   @@ -132,7 +132,7 @@
>        }
>    
>        fprintf(stdout, "\tServer:  Creating new socket.......");
>   -    if (apr_socket_create(&sock, family, SOCK_STREAM, context) != APR_SUCCESS) {
>   +    if (apr_socket_create(&sock, family, SOCK_STREAM, APR_NO_INHERIT, context) != APR_SUCCESS) {
>            fprintf(stderr, "Couldn't create socket\n");
>            exit(-1);
>        }
>   
>   
>   
>   1.4       +1 -1      apr/test/testpoll.c
>   
>   Index: testpoll.c
>   ===================================================================
>   RCS file: /home/cvs/apr/test/testpoll.c,v
>   retrieving revision 1.3
>   retrieving revision 1.4
>   diff -u -r1.3 -r1.4
>   --- testpoll.c	2001/06/08 04:49:48	1.3
>   +++ testpoll.c	2001/07/16 16:11:05	1.4
>   @@ -72,7 +72,7 @@
>            printf("couldn't create control socket information, shutting down");
>            return 1;
>        }
>   -    if (apr_socket_create(sock, (*sa)->sa.sin.sin_family, SOCK_DGRAM, p)
>   +    if (apr_socket_create(sock, (*sa)->sa.sin.sin_family, SOCK_DGRAM, APR_NO_INHERIT, p)
>            != APR_SUCCESS){
>            printf("couldn't create UDP socket, shutting down");
>            return 1;
>   
>   
>   
>   1.2       +6 -6      apr/test/testsockets.c
>   
>   Index: testsockets.c
>   ===================================================================
>   RCS file: /home/cvs/apr/test/testsockets.c,v
>   retrieving revision 1.1
>   retrieving revision 1.2
>   diff -u -r1.1 -r1.2
>   --- testsockets.c	2001/07/07 07:55:18	1.1
>   +++ testsockets.c	2001/07/16 16:11:05	1.2
>   @@ -101,20 +101,20 @@
>        printf("Testing socket creation functions.\n");
>    
>        STD_TEST_NEQ("    Creating a TCP socket",
>   -                 apr_socket_create(&sock, APR_INET, SOCK_STREAM, pool))
>   +                 apr_socket_create(&sock, APR_INET, SOCK_STREAM, APR_NO_INHERIT, pool))
>        close_sock(sock);
>    
>        STD_TEST_NEQ("    Creating UDP socket",
>   -                 apr_socket_create(&sock, APR_INET, SOCK_DGRAM, pool))
>   +                 apr_socket_create(&sock, APR_INET, SOCK_DGRAM, APR_NO_INHERIT, pool))
>        close_sock(sock);
>    
>    #if APR_HAVE_IPV6
>        STD_TEST_NEQ("    Creating an IPv6 TCP socket",
>   -                 apr_socket_create(&sock, APR_INET6, SOCK_STREAM, pool))
>   +                 apr_socket_create(&sock, APR_INET6, SOCK_STREAM, APR_NO_INHERIT, pool))
>        close_sock(sock);
>    
>        STD_TEST_NEQ("    Creating an IPv6 UDP socket",
>   -                 apr_socket_create(&sock, APR_INET6, SOCK_DGRAM, pool))
>   +                 apr_socket_create(&sock, APR_INET6, SOCK_DGRAM, APR_NO_INHERIT, pool))
>        close_sock(sock);
>    #else
>        printf("NO IPv6 support.\n");
>   @@ -123,9 +123,9 @@
>        printf("Now trying sendto/recvfrom (simple tests only)\n");
>    
>        STD_TEST_NEQ("    Creating socket #1 for test",
>   -                 apr_socket_create(&sock, family, SOCK_DGRAM, pool))
>   +                 apr_socket_create(&sock, family, SOCK_DGRAM, APR_NO_INHERIT, pool))
>        STD_TEST_NEQ("    Creating socket #2 for test",
>   -                 apr_socket_create(&sock2, family, SOCK_DGRAM, pool))
>   +                 apr_socket_create(&sock2, family, SOCK_DGRAM, APR_NO_INHERIT, pool))
>    
>        apr_sockaddr_info_get(&to, US, APR_UNSPEC, 7772, 0, pool);
>        apr_sockaddr_info_get(&from, US, APR_UNSPEC, 7771, 0, pool);
>   
>   
>   
>   1.7       +1 -1      apr/test/testsockopt.c
>   
>   Index: testsockopt.c
>   ===================================================================
>   RCS file: /home/cvs/apr/test/testsockopt.c,v
>   retrieving revision 1.6
>   retrieving revision 1.7
>   diff -u -r1.6 -r1.7
>   --- testsockopt.c	2001/06/08 04:49:50	1.6
>   +++ testsockopt.c	2001/07/16 16:11:05	1.7
>   @@ -103,7 +103,7 @@
>        printf("Testing socket option functions.\n");
>    
>        printf("\tCreating socket..........................");
>   -    if ((stat = apr_socket_create(&sock, APR_INET, SOCK_STREAM, context))
>   +    if ((stat = apr_socket_create(&sock, APR_INET, SOCK_STREAM, APR_NO_INHERIT, context))
>             != APR_SUCCESS){
>            printf("Failed to create a socket!\n");
>            exit(-1);
>   
>   
>   
>   1.73      +3 -3      httpd-2.0/support/ab.c
>   
>   Index: ab.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/support/ab.c,v
>   retrieving revision 1.72
>   retrieving revision 1.73
>   diff -u -r1.72 -r1.73
>   --- ab.c	2001/06/26 04:07:43	1.72
>   +++ ab.c	2001/07/16 16:11:05	1.73
>   @@ -844,7 +844,7 @@
>    	apr_err(buf, rv);
>        }
>        if ((rv = apr_socket_create(&c->aprsock, destsa->sa.sin.sin_family,
>   -				SOCK_STREAM, cntxt)) != APR_SUCCESS) {
>   +				SOCK_STREAM, APR_NO_INHERIT, cntxt)) != APR_SUCCESS) {
>    	apr_err("socket", rv);
>        }
>        c->start = apr_time_now();
>   @@ -1289,14 +1289,14 @@
>    static void copyright(void)
>    {
>        if (!use_html) {
>   -	printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.72 $> apache-2.0");
>   +	printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.73 $> 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.72 $");
>   +	printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.73 $");
>    	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");
>   
>   
>   
--
Ian Holsman          IanH@cnet.com
Performance Measurement & Analysis
CNET Networks   -   (415) 364-8608


Re: cvs commit: httpd-2.0/support ab.c

Posted by rb...@covalent.net.
On 16 Jul 2001, Ian Holsman wrote:

> hi Ryan.
> just patching up the proxy code at the moment,
> should I be using APR_INHERIT there? does it really matter?
> as the socket being created is in a child which won't spawn any more
> processes?

You don't know the child won't create any more processes.  Think of a
filter that needs us to create a new process, such as the external_filter.
These should probably be created non-inherited in most cases.

Ryan

>
> On 16 Jul 2001 16:11:05 +0000, rbb@apache.org wrote:
> > rbb         01/07/16 09:11:05
> >
> >   Modified:    server   listen.c mpm_common.c rfc1413.c
> >                .        CHANGES
> >                include  apr_network_io.h apr_portable.h
> >                include/arch/unix networkio.h
> >                network_io/unix sockets.c
> >                test     client.c sendfile.c server.c testpoll.c
> >                         testsockets.c testsockopt.c
> >                support  ab.c
> >   Added:       include  apr_inherit.h
> >   Log:
> >   Added an inherit flag to apr_socket_create and other socket creation
> >   functions.  This allows APR programs to specify that a socket should
> >   be passed to any child processes that are created.  The inherit flag
> >   is only meaningful if programs use apr_process_create().  This
> >   also adds a couple of macros that allow APR types to set and unset
> >   the inherit flag.
> >
> >   This also fixes Apache to use the new API.
> >
> >   Revision  Changes    Path
> >   1.54      +2 -2      httpd-2.0/server/listen.c
> >
> >   Index: listen.c
> >   ===================================================================
> >   RCS file: /home/cvs/httpd-2.0/server/listen.c,v
> >   retrieving revision 1.53
> >   retrieving revision 1.54
> >   diff -u -r1.53 -r1.54
> >   --- listen.c	2001/04/05 19:04:14	1.53
> >   +++ listen.c	2001/07/16 16:11:03	1.54
> >   @@ -191,7 +191,7 @@
> >        if (default_family == APR_UNSPEC) {
> >            apr_socket_t *tmp_sock;
> >
> >   -        if (apr_socket_create(&tmp_sock, APR_INET6, SOCK_STREAM,
> >   +        if (apr_socket_create(&tmp_sock, APR_INET6, SOCK_STREAM, APR_INHERIT,
> >                                  p) == APR_SUCCESS) {
> >                apr_socket_close(tmp_sock);
> >                default_family = APR_INET6;
> >   @@ -254,7 +254,7 @@
> >            return;
> >        }
> >        if ((status = apr_socket_create(&new->sd, new->bind_addr->sa.sin.sin_family,
> >   -                                    SOCK_STREAM, process->pool)) != APR_SUCCESS) {
> >   +                                    SOCK_STREAM, APR_INHERIT, 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;
> >
> >
> >
> >   1.56      +1 -1      httpd-2.0/server/mpm_common.c
> >
> >   Index: mpm_common.c
> >   ===================================================================
> >   RCS file: /home/cvs/httpd-2.0/server/mpm_common.c,v
> >   retrieving revision 1.55
> >   retrieving revision 1.56
> >   diff -u -r1.55 -r1.56
> >   --- mpm_common.c	2001/07/11 14:48:23	1.55
> >   +++ mpm_common.c	2001/07/16 16:11:03	1.56
> >   @@ -403,7 +403,7 @@
> >        }
> >
> >        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, pod->p);
> >   +    rv = apr_socket_create(&sock, sa->family, SOCK_STREAM, APR_NO_INHERIT, pod->p);
> >        if (rv != APR_SUCCESS) {
> >            ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
> >                         "get socket to connect to listener");
> >
> >
> >
> >   1.41      +2 -1      httpd-2.0/server/rfc1413.c
> >
> >   Index: rfc1413.c
> >   ===================================================================
> >   RCS file: /home/cvs/httpd-2.0/server/rfc1413.c,v
> >   retrieving revision 1.40
> >   retrieving revision 1.41
> >   diff -u -r1.40 -r1.41
> >   --- rfc1413.c	2001/04/10 20:41:45	1.40
> >   +++ rfc1413.c	2001/07/16 16:11:03	1.41
> >   @@ -83,6 +83,7 @@
> >    #include "apr_network_io.h"
> >    #include "apr_strings.h"
> >    #include "apr_lib.h"
> >   +#include "apr_inherit.h"
> >
> >    #define APR_WANT_STDIO
> >    #define APR_WANT_STRFUNC
> >   @@ -140,7 +141,7 @@
> >
> >        if ((rv = apr_socket_create(newsock,
> >                                    localsa->sa.sin.sin_family, /* has to match */
> >   -                                SOCK_STREAM, conn->pool)) != APR_SUCCESS) {
> >   +                                SOCK_STREAM, APR_NO_INHERIT, conn->pool)) != APR_SUCCESS) {
> >    	ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
> >                         "rfc1413: error creating query socket");
> >            return rv;
> >
> >
> >
> >   1.120     +7 -0      apr/CHANGES
> >
> >   Index: CHANGES
> >   ===================================================================
> >   RCS file: /home/cvs/apr/CHANGES,v
> >   retrieving revision 1.119
> >   retrieving revision 1.120
> >   diff -u -r1.119 -r1.120
> >   --- CHANGES	2001/07/11 18:41:29	1.119
> >   +++ CHANGES	2001/07/16 16:11:03	1.120
> >   @@ -1,5 +1,12 @@
> >    Changes with APR b1
> >
> >   +  *) Added an inherit flag to apr_socket_create and other socket creation
> >   +     functions.  This allows APR programs to specify that a socket should
> >   +     be passed to any child processes that are created.  The inherit flag
> >   +     is only meaningful if programs use apr_process_create().  This
> >   +     also adds a couple of macros that allow APR types to set and unset
> >   +     the inherit flag.  [Ryan Bloom]
> >   +
> >      *) apr_connect()on Windows: Handle timeouts and returning the proper
> >         status code when a connect is in progress. [Bill Stoddard]
> >
> >
> >
> >
> >   1.103     +5 -1      apr/include/apr_network_io.h
> >
> >   Index: apr_network_io.h
> >   ===================================================================
> >   RCS file: /home/cvs/apr/include/apr_network_io.h,v
> >   retrieving revision 1.102
> >   retrieving revision 1.103
> >   diff -u -r1.102 -r1.103
> >   --- apr_network_io.h	2001/05/02 02:32:44	1.102
> >   +++ apr_network_io.h	2001/07/16 16:11:03	1.103
> >   @@ -63,6 +63,7 @@
> >    #include "apr_pools.h"
> >    #include "apr_file_io.h"
> >    #include "apr_errno.h"
> >   +#include "apr_inherit.h"
> >
> >    #if APR_HAVE_NETINET_IN_H
> >    #include <netinet/in.h>
> >   @@ -240,12 +241,13 @@
> >     * @param new_sock The new socket that has been set up.
> >     * @param family The address family of the socket (e.g., APR_INET).
> >     * @param type The type of the socket (e.g., SOCK_STREAM).
> >   + * @param inherit Should this socket be inherited by child processes
> >     * @param cont The pool to use
> >     * @deffunc apr_status_t apr_socket_create(apr_socket_t **new_sock, int family, int type, apr_pool_t *cont)
> >     */
> >    APR_DECLARE(apr_status_t) apr_socket_create(apr_socket_t **new_sock,
> >                                                int family, int type,
> >   -                                            apr_pool_t *cont);
> >   +                                            int inherit, apr_pool_t *cont);
> >
> >    /**
> >     * Shutdown either reading, writing, or both sides of a tcp socket.
> >   @@ -800,6 +802,8 @@
> >    apr_status_t apr_socket_accept_filter(apr_socket_t *sock, char name[16],
> >                                          char args[256 - 16]);
> >    #endif
> >   +
> >   +APR_DECLARE_SET_INHERIT(socket);
> >
> >    #ifdef __cplusplus
> >    }
> >
> >
> >
> >   1.63      +2 -0      apr/include/apr_portable.h
> >
> >   Index: apr_portable.h
> >   ===================================================================
> >   RCS file: /home/cvs/apr/include/apr_portable.h,v
> >   retrieving revision 1.62
> >   retrieving revision 1.63
> >   diff -u -r1.62 -r1.63
> >   --- apr_portable.h	2001/07/07 16:45:08	1.62
> >   +++ apr_portable.h	2001/07/16 16:11:03	1.63
> >   @@ -321,6 +321,7 @@
> >     * @param apr_sock The new socket that has been set up
> >     * @param os_sock_info The os representation of the socket handle and
> >     *        other characteristics of the socket
> >   + * @param inherit Should this socket be inherited by child processes
> >     * @param cont The pool to use
> >     * @deffunc apr_status_t apr_os_sock_make(apr_socket_t **apr_sock, apr_os_sock_info_t *os_sock_info, apr_pool_t *cont)
> >     * @tip If you only know the descriptor/handle or if it isn't really
> >   @@ -328,6 +329,7 @@
> >     */
> >    APR_DECLARE(apr_status_t) apr_os_sock_make(apr_socket_t **apr_sock,
> >                                               apr_os_sock_info_t *os_sock_info,
> >   +                                           int inherit,
> >                                               apr_pool_t *cont);
> >
> >    /**
> >
> >
> >
> >   1.1                  apr/include/apr_inherit.h
> >
> >   Index: apr_inherit.h
> >   ===================================================================
> >   /* ====================================================================
> >    * The Apache Software License, Version 1.1
> >    *
> >    * Copyright (c) 2000-2001 The Apache Software Foundation.  All rights
> >    * reserved.
> >    *
> >    * Redistribution and use in source and binary forms, with or without
> >    * modification, are permitted provided that the following conditions
> >    * are met:
> >    *
> >    * 1. Redistributions of source code must retain the above copyright
> >    *    notice, this list of conditions and the following disclaimer.
> >    *
> >    * 2. Redistributions in binary form must reproduce the above copyright
> >    *    notice, this list of conditions and the following disclaimer in
> >    *    the documentation and/or other materials provided with the
> >    *    distribution.
> >    *
> >    * 3. The end-user documentation included with the redistribution,
> >    *    if any, must include the following acknowledgment:
> >    *       "This product includes software developed by the
> >    *        Apache Software Foundation (http://www.apache.org/)."
> >    *    Alternately, this acknowledgment may appear in the software itself,
> >    *    if and wherever such third-party acknowledgments normally appear.
> >    *
> >    * 4. The names "Apache" and "Apache Software Foundation" must
> >    *    not be used to endorse or promote products derived from this
> >    *    software without prior written permission. For written
> >    *    permission, please contact apache@apache.org.
> >    *
> >    * 5. Products derived from this software may not be called "Apache",
> >    *    nor may "Apache" appear in their name, without prior written
> >    *    permission of the Apache Software Foundation.
> >    *
> >    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
> >    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
> >    * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
> >    * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
> >    * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> >    * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> >    * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
> >    * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
> >    * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
> >    * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
> >    * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
> >    * SUCH DAMAGE.
> >    * ====================================================================
> >    *
> >    * This software consists of voluntary contributions made by many
> >    * individuals on behalf of the Apache Software Foundation.  For more
> >    * information on the Apache Software Foundation, please see
> >    * <http://www.apache.org/>.
> >    */
> >
> >   #ifndef APR_INHERIT_H
> >   #define APR_INHERIT_H
> >
> >   #ifdef __cplusplus
> >   extern "C" {
> >   #endif /* __cplusplus */
> >
> >   #define APR_NO_INHERIT 0
> >   #define APR_INHERIT    1
> >
> >   #define APR_DECLARE_SET_INHERIT(name) \
> >       void apr_##name##_set_inherit(apr_##name##_t *name)
> >
> >   #define APR_SET_INHERIT(name, pool, cleanup, field_exists)          \
> >   void apr_##name##_set_inherit(apr_##name##_t *name)                 \
> >   {                                                                   \
> >       name->inherit = 1;                                              \
> >       apr_pool_cleanup_register(name->##pool, (void *)##name##, NULL, \
> >                                 cleanup);                             \
> >   }
> >
> >   #define APR_DECLARE_UNSET_INHERIT(name) \
> >       void apr_##name##_unset_inherit(apr_##name##_t *name)
> >
> >   #define APR_UNSET_INHERIT(name, pool, cleanup, field_exists)          \
> >   void apr_##name##_unset_inherit(apr_##name##_t *name)                 \
> >   {                                                                   \
> >       name->inherit = 0;                                              \
> >       apr_pool_cleanup_kill(name->##pool, (void *)##name##, NULL, \
> >                                 cleanup);                             \
> >   }
> >
> >   #ifdef __cplusplus
> >   }
> >   #endif
> >
> >   #endif	/* ! APR_INHERIT_H */
> >
> >
> >
> >   1.47      +1 -0      apr/include/arch/unix/networkio.h
> >
> >   Index: networkio.h
> >   ===================================================================
> >   RCS file: /home/cvs/apr/include/arch/unix/networkio.h,v
> >   retrieving revision 1.46
> >   retrieving revision 1.47
> >   diff -u -r1.46 -r1.47
> >   --- networkio.h	2001/07/10 15:01:33	1.46
> >   +++ networkio.h	2001/07/16 16:11:04	1.47
> >   @@ -135,6 +135,7 @@
> >        int local_port_unknown;
> >        int local_interface_unknown;
> >        apr_int32_t netmask;
> >   +    int inherit;
> >    };
> >
> >    struct apr_pollfd_t {
> >
> >
> >
> >   1.77      +11 -4     apr/network_io/unix/sockets.c
> >
> >   Index: sockets.c
> >   ===================================================================
> >   RCS file: /home/cvs/apr/network_io/unix/sockets.c,v
> >   retrieving revision 1.76
> >   retrieving revision 1.77
> >   diff -u -r1.76 -r1.77
> >   --- sockets.c	2001/07/10 17:18:55	1.76
> >   +++ sockets.c	2001/07/16 16:11:04	1.77
> >   @@ -53,7 +53,9 @@
> >     */
> >
> >    #include "networkio.h"
> >   +#include "apr_network_io.h"
> >    #include "apr_portable.h"
> >   +#include "apr_inherit.h"
> >
> >    static apr_status_t socket_cleanup(void *sock)
> >    {
> >   @@ -125,7 +127,7 @@
> >    }
> >
> >    apr_status_t apr_socket_create(apr_socket_t **new, int ofamily, int type,
> >   -                               apr_pool_t *cont)
> >   +                               int inherit, apr_pool_t *cont)
> >    {
> >        int family = ofamily;
> >
> >   @@ -158,8 +160,9 @@
> >        set_socket_vars(*new, family, type);
> >
> >        (*new)->timeout = -1;
> >   +    (*new)->inherit = inherit;
> >        apr_pool_cleanup_register((*new)->cntxt, (void *)(*new),
> >   -                        socket_cleanup, apr_pool_cleanup_null);
> >   +                        socket_cleanup, inherit ? socket_cleanup : NULL );
> >        return APR_SUCCESS;
> >    }
> >
> >   @@ -250,8 +253,9 @@
> >            (*new)->local_interface_unknown = 1;
> >        }
> >
> >   +    (*new)->inherit = sock->inherit;
> >        apr_pool_cleanup_register((*new)->cntxt, (void *)(*new),
> >   -                        socket_cleanup, apr_pool_cleanup_null);
> >   +                        socket_cleanup, (*new)->inherit ? socket_cleanup : NULL);
> >        return APR_SUCCESS;
> >    }
> >
> >   @@ -328,6 +332,7 @@
> >
> >    apr_status_t apr_os_sock_make(apr_socket_t **apr_sock,
> >                                  apr_os_sock_info_t *os_sock_info,
> >   +                              int inherit,
> >                                  apr_pool_t *cont)
> >    {
> >        alloc_socket(apr_sock, cont);
> >   @@ -351,8 +356,9 @@
> >                   (*apr_sock)->remote_addr->salen);
> >        }
> >
> >   +    (*apr_sock)->inherit = inherit;
> >        apr_pool_cleanup_register((*apr_sock)->cntxt, (void *)(*apr_sock),
> >   -                        socket_cleanup, apr_pool_cleanup_null);
> >   +                        socket_cleanup, inherit ? socket_cleanup : NULL);
> >
> >        return APR_SUCCESS;
> >    }
> >   @@ -373,3 +379,4 @@
> >        return APR_SUCCESS;
> >    }
> >
> >   +APR_SET_INHERIT(socket, cntxt, socket_cleanup, 1)
> >
> >
> >
> >   1.31      +1 -1      apr/test/client.c
> >
> >   Index: client.c
> >   ===================================================================
> >   RCS file: /home/cvs/apr/test/client.c,v
> >   retrieving revision 1.30
> >   retrieving revision 1.31
> >   diff -u -r1.30 -r1.31
> >   --- client.c	2001/07/10 15:01:43	1.30
> >   +++ client.c	2001/07/16 16:11:04	1.31
> >   @@ -110,7 +110,7 @@
> >        fprintf(stdout,"OK\n");
> >
> >        fprintf(stdout, "\tClient:  Creating new socket.......");
> >   -    if (apr_socket_create(&sock, remote_sa->family, SOCK_STREAM,
> >   +    if (apr_socket_create(&sock, remote_sa->family, SOCK_STREAM, APR_NO_INHERIT,
> >                              context) != APR_SUCCESS) {
> >            fprintf(stderr, "Couldn't create socket\n");
> >            exit(-1);
> >
> >
> >
> >   1.15      +1 -1      apr/test/sendfile.c
> >
> >   Index: sendfile.c
> >   ===================================================================
> >   RCS file: /home/cvs/apr/test/sendfile.c,v
> >   retrieving revision 1.14
> >   retrieving revision 1.15
> >   diff -u -r1.14 -r1.15
> >   --- sendfile.c	2001/06/08 04:49:44	1.14
> >   +++ sendfile.c	2001/07/16 16:11:05	1.15
> >   @@ -114,7 +114,7 @@
> >        }
> >
> >        *sock = NULL;
> >   -    rv = apr_socket_create(sock, *family, SOCK_STREAM, *p);
> >   +    rv = apr_socket_create(sock, *family, SOCK_STREAM, APR_NO_INHERIT, *p);
> >        if (rv != APR_SUCCESS) {
> >            fprintf(stderr, "apr_socket_create()->%d/%s\n",
> >                    rv,
> >
> >
> >
> >   1.29      +1 -1      apr/test/server.c
> >
> >   Index: server.c
> >   ===================================================================
> >   RCS file: /home/cvs/apr/test/server.c,v
> >   retrieving revision 1.28
> >   retrieving revision 1.29
> >   diff -u -r1.28 -r1.29
> >   --- server.c	2001/06/08 04:49:44	1.28
> >   +++ server.c	2001/07/16 16:11:05	1.29
> >   @@ -132,7 +132,7 @@
> >        }
> >
> >        fprintf(stdout, "\tServer:  Creating new socket.......");
> >   -    if (apr_socket_create(&sock, family, SOCK_STREAM, context) != APR_SUCCESS) {
> >   +    if (apr_socket_create(&sock, family, SOCK_STREAM, APR_NO_INHERIT, context) != APR_SUCCESS) {
> >            fprintf(stderr, "Couldn't create socket\n");
> >            exit(-1);
> >        }
> >
> >
> >
> >   1.4       +1 -1      apr/test/testpoll.c
> >
> >   Index: testpoll.c
> >   ===================================================================
> >   RCS file: /home/cvs/apr/test/testpoll.c,v
> >   retrieving revision 1.3
> >   retrieving revision 1.4
> >   diff -u -r1.3 -r1.4
> >   --- testpoll.c	2001/06/08 04:49:48	1.3
> >   +++ testpoll.c	2001/07/16 16:11:05	1.4
> >   @@ -72,7 +72,7 @@
> >            printf("couldn't create control socket information, shutting down");
> >            return 1;
> >        }
> >   -    if (apr_socket_create(sock, (*sa)->sa.sin.sin_family, SOCK_DGRAM, p)
> >   +    if (apr_socket_create(sock, (*sa)->sa.sin.sin_family, SOCK_DGRAM, APR_NO_INHERIT, p)
> >            != APR_SUCCESS){
> >            printf("couldn't create UDP socket, shutting down");
> >            return 1;
> >
> >
> >
> >   1.2       +6 -6      apr/test/testsockets.c
> >
> >   Index: testsockets.c
> >   ===================================================================
> >   RCS file: /home/cvs/apr/test/testsockets.c,v
> >   retrieving revision 1.1
> >   retrieving revision 1.2
> >   diff -u -r1.1 -r1.2
> >   --- testsockets.c	2001/07/07 07:55:18	1.1
> >   +++ testsockets.c	2001/07/16 16:11:05	1.2
> >   @@ -101,20 +101,20 @@
> >        printf("Testing socket creation functions.\n");
> >
> >        STD_TEST_NEQ("    Creating a TCP socket",
> >   -                 apr_socket_create(&sock, APR_INET, SOCK_STREAM, pool))
> >   +                 apr_socket_create(&sock, APR_INET, SOCK_STREAM, APR_NO_INHERIT, pool))
> >        close_sock(sock);
> >
> >        STD_TEST_NEQ("    Creating UDP socket",
> >   -                 apr_socket_create(&sock, APR_INET, SOCK_DGRAM, pool))
> >   +                 apr_socket_create(&sock, APR_INET, SOCK_DGRAM, APR_NO_INHERIT, pool))
> >        close_sock(sock);
> >
> >    #if APR_HAVE_IPV6
> >        STD_TEST_NEQ("    Creating an IPv6 TCP socket",
> >   -                 apr_socket_create(&sock, APR_INET6, SOCK_STREAM, pool))
> >   +                 apr_socket_create(&sock, APR_INET6, SOCK_STREAM, APR_NO_INHERIT, pool))
> >        close_sock(sock);
> >
> >        STD_TEST_NEQ("    Creating an IPv6 UDP socket",
> >   -                 apr_socket_create(&sock, APR_INET6, SOCK_DGRAM, pool))
> >   +                 apr_socket_create(&sock, APR_INET6, SOCK_DGRAM, APR_NO_INHERIT, pool))
> >        close_sock(sock);
> >    #else
> >        printf("NO IPv6 support.\n");
> >   @@ -123,9 +123,9 @@
> >        printf("Now trying sendto/recvfrom (simple tests only)\n");
> >
> >        STD_TEST_NEQ("    Creating socket #1 for test",
> >   -                 apr_socket_create(&sock, family, SOCK_DGRAM, pool))
> >   +                 apr_socket_create(&sock, family, SOCK_DGRAM, APR_NO_INHERIT, pool))
> >        STD_TEST_NEQ("    Creating socket #2 for test",
> >   -                 apr_socket_create(&sock2, family, SOCK_DGRAM, pool))
> >   +                 apr_socket_create(&sock2, family, SOCK_DGRAM, APR_NO_INHERIT, pool))
> >
> >        apr_sockaddr_info_get(&to, US, APR_UNSPEC, 7772, 0, pool);
> >        apr_sockaddr_info_get(&from, US, APR_UNSPEC, 7771, 0, pool);
> >
> >
> >
> >   1.7       +1 -1      apr/test/testsockopt.c
> >
> >   Index: testsockopt.c
> >   ===================================================================
> >   RCS file: /home/cvs/apr/test/testsockopt.c,v
> >   retrieving revision 1.6
> >   retrieving revision 1.7
> >   diff -u -r1.6 -r1.7
> >   --- testsockopt.c	2001/06/08 04:49:50	1.6
> >   +++ testsockopt.c	2001/07/16 16:11:05	1.7
> >   @@ -103,7 +103,7 @@
> >        printf("Testing socket option functions.\n");
> >
> >        printf("\tCreating socket..........................");
> >   -    if ((stat = apr_socket_create(&sock, APR_INET, SOCK_STREAM, context))
> >   +    if ((stat = apr_socket_create(&sock, APR_INET, SOCK_STREAM, APR_NO_INHERIT, context))
> >             != APR_SUCCESS){
> >            printf("Failed to create a socket!\n");
> >            exit(-1);
> >
> >
> >
> >   1.73      +3 -3      httpd-2.0/support/ab.c
> >
> >   Index: ab.c
> >   ===================================================================
> >   RCS file: /home/cvs/httpd-2.0/support/ab.c,v
> >   retrieving revision 1.72
> >   retrieving revision 1.73
> >   diff -u -r1.72 -r1.73
> >   --- ab.c	2001/06/26 04:07:43	1.72
> >   +++ ab.c	2001/07/16 16:11:05	1.73
> >   @@ -844,7 +844,7 @@
> >    	apr_err(buf, rv);
> >        }
> >        if ((rv = apr_socket_create(&c->aprsock, destsa->sa.sin.sin_family,
> >   -				SOCK_STREAM, cntxt)) != APR_SUCCESS) {
> >   +				SOCK_STREAM, APR_NO_INHERIT, cntxt)) != APR_SUCCESS) {
> >    	apr_err("socket", rv);
> >        }
> >        c->start = apr_time_now();
> >   @@ -1289,14 +1289,14 @@
> >    static void copyright(void)
> >    {
> >        if (!use_html) {
> >   -	printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.72 $> apache-2.0");
> >   +	printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.73 $> 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.72 $");
> >   +	printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.73 $");
> >    	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");
> >
> >
> >
> --
> Ian Holsman          IanH@cnet.com
> Performance Measurement & Analysis
> CNET Networks   -   (415) 364-8608
>
>
>


_____________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
-----------------------------------------------------------------------------