httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/winnt mpm_winnt.c
Date Tue, 03 Apr 2001 01:09:30 GMT
stoddard    01/04/02 18:09:29

  Modified:    .        STATUS CHANGES
               server/mpm/winnt mpm_winnt.c
  Log:
  Get MaxRequestsPerChild working on Windows.
  
  Revision  Changes    Path
  1.215     +1 -4      httpd-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/STATUS,v
  retrieving revision 1.214
  retrieving revision 1.215
  diff -u -r1.214 -r1.215
  --- STATUS	2001/04/03 00:27:08	1.214
  +++ STATUS	2001/04/03 01:09:16	1.215
  @@ -1,5 +1,5 @@
   APACHE 2.0 STATUS:						-*-text-*-
  -Last modified at [$Date: 2001/04/03 00:27:08 $]
  +Last modified at [$Date: 2001/04/03 01:09:16 $]
   
   Release:
   
  @@ -27,9 +27,6 @@
       * Root all file systems with <Directory /> for WIN32/OS2/NW permissions 
           Status: patch brought forward from 1.3.14
                   WIN32 and OS2 need review [William Rowe, Brian Harvard]
  -
  -    * Win32: Enable the Windows MPM to honor max_requests_per_child
  -        Status: FirstBill will fix this?
   
       * Win32: Get Apache working on Windows 95/98. The following work
   	(at least) needs to be done:
  
  
  
  1.157     +2 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.156
  retrieving revision 1.157
  diff -u -r1.156 -r1.157
  --- CHANGES	2001/04/03 00:27:09	1.156
  +++ CHANGES	2001/04/03 01:09:19	1.157
  @@ -1,4 +1,6 @@
   Changes with Apache 2.0.16-dev
  +  *) Get MaxRequestsPerChild working with the Windows MPM.
  +     [Bill Stoddard]
   
     *) Make generic hooks to work, with mod_generic_hook_import/export
        experimental modules.  [Ben Laurie, Will Rowe]
  
  
  
  1.155     +10 -0     httpd-2.0/server/mpm/winnt/mpm_winnt.c
  
  Index: mpm_winnt.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
  retrieving revision 1.154
  retrieving revision 1.155
  diff -u -r1.154 -r1.155
  --- mpm_winnt.c	2001/04/03 00:44:47	1.154
  +++ mpm_winnt.c	2001/04/03 01:09:25	1.155
  @@ -671,6 +671,7 @@
   static void winnt_accept(void *listen_socket) 
   {
       static int num_completion_contexts = 0;
  +    static int requests_this_child = 0;
       PCOMP_CONTEXT pCompContext;
       DWORD BytesRead;
       SOCKET nlsd;
  @@ -679,6 +680,9 @@
       nlsd = (SOCKET) listen_socket;
   
       while (!shutdown_in_progress) {
  +        if (ap_max_requests_per_child && (requests_this_child > ap_max_requests_per_child))
{
  +            break;
  +	}
           pCompContext = NULL;
           /* Grab a context off the queue */
           apr_lock_acquire(qlock);
  @@ -778,6 +782,12 @@
            */
           PostQueuedCompletionStatus(ThreadDispatchIOCP, 0, IOCP_CONNECTION_ACCEPTED,
                                      &pCompContext->Overlapped);
  +        requests_this_child++;
  +    }
  +
  +    if (!shutdown_in_progress) {
  +        /* Yow, hit an irrecoverable error! Tell the child to die. */
  +        SetEvent(exit_event);
       }
   }
   static PCOMP_CONTEXT winnt_get_connection(PCOMP_CONTEXT pCompContext)
  
  
  

Mime
View raw message