You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Sunitha Kumar <su...@cisco.com> on 2001/08/20 23:13:29 UTC

about file descriptor loss during graceful restart

where can I find the thread which discussed this.

thanks,

--
Sunitha Kumar
http://www.cisco.com



Re: about file descriptor loss during graceful restart

Posted by Cliff Woolley <cl...@yahoo.com>.
On Mon, 20 Aug 2001, Sunitha Kumar wrote:

> where can I find the thread which discussed this.

There wasn't much of a thread I don't think... Ryan committed the fix
about a week ago with little discussion on the matter IIRC.  The commit
message was as follows:


--------------------------------------------------------------
>From rbb@apache.org Mon Aug 20 17:21:06 2001
Date: 13 Aug 2001 04:25:43 -0000
From: rbb@apache.org
Reply-To: new-httpd@apache.org
To: httpd-2.0-cvs@apache.org
Subject: cvs commit: httpd-2.0/server listen.c

rbb         01/08/12 21:25:43

  Modified:    .        CHANGES
               server   listen.c
  Log:
  Close a major resource leak.  Everytime we had issued a
  graceful restart, we leaked a socket descriptor.

  The listening sockets should not be set inheritable, at least
  not at this point.  We only want some of the httpd children to
  inherit the socket.  Namely, those that will be actually serving
  requests.  Any other child process (piped logs), should not be
  inheriting the sockets.

  PR:	7891

  Revision  Changes    Path
  1.289     +4 -0      httpd-2.0/CHANGES

  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.288
  retrieving revision 1.289
  diff -u -r1.288 -r1.289
  --- CHANGES	2001/08/11 04:09:45	1.288
  +++ CHANGES	2001/08/13 04:25:42	1.289
  @@ -1,5 +1,9 @@
   Changes with Apache 2.0.24-dev

  +  *) Close a major resource leak.  Everytime we had issued a
  +     graceful restart, we leaked a socket descriptor.
  +     [Ryan Bloom]
  +
     *) Fix a problem with the new method code.  We need to cast
        the 1 to an apr_int64_t or it will be treated as a 32-bit
        integer, and it will wrap after being shifted 32 times.



  1.60      +0 -1      httpd-2.0/server/listen.c

  Index: listen.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/listen.c,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- listen.c	2001/07/26 16:36:40	1.59
  +++ listen.c	2001/08/13 04:25:43	1.60
  @@ -259,7 +259,6 @@
                        "alloc_listener: failed to get a socket for %s", addr);
           return;
       }
  -    apr_socket_set_inherit(new->sd);
       new->next = ap_listeners;
       ap_listeners = new;
   }


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA