httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@hyperreal.org
Subject cvs commit: apache-2.0/src/modules/mpm/winnt winnt.c
Date Mon, 14 Feb 2000 14:28:18 GMT
stoddard    00/02/14 06:28:17

  Modified:    src/modules/mpm/winnt winnt.c
  Log:
  Enable Windows MPM to run in single process mode
  Submitted by:	Allan Edwards
  Reviewed by:	Bill Stoddard
  
  Revision  Changes    Path
  1.38      +20 -0     apache-2.0/src/modules/mpm/winnt/winnt.c
  
  Index: winnt.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/winnt.c,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- winnt.c	2000/02/01 00:34:05	1.37
  +++ winnt.c	2000/02/14 14:28:16	1.38
  @@ -1237,7 +1237,16 @@
   
       /* Setup the listening sockets */
       if (one_process) {
  +        ap_listen_rec *lr;
           setup_listeners(server_conf);
  +
  +        /* Associate the socket with the IO Completion port */
  +        for (lr = ap_listeners; lr; lr = lr->next) {
  +            int nsd;
  +            ap_get_os_sock(&nsd,lr->sd);
  +            CreateIoCompletionPort((HANDLE) nsd, AcceptExCompPort, 0, 0);
  +        }
  +  
       } else {
           setup_inherited_listeners(server_conf);
       }
  @@ -1745,7 +1754,18 @@
           AMCSocketInitialize();
           exit_event_name = ap_psprintf(pconf, "apC%d", my_pid);
           setup_signal_names(ap_psprintf(pconf,"ap%d", parent_pid));
  +
           if (one_process) {
  +            /* Create the IO CompletionPort */
  +            if (AcceptExCompPort == NULL) {
  +                AcceptExCompPort = CreateIoCompletionPort(INVALID_HANDLE_VALUE,
  +                                                          NULL, 0, 0); 
  +                if (AcceptExCompPort == NULL) {
  +                    ap_log_error(APLOG_MARK,APLOG_ERR, GetLastError(), server_conf,
  +                                 "Unable to create the AcceptExCompletionPort -- process
will exit");
  +                    return -1;
  +                }
  +            }
               ap_create_lock(&start_mutex,APR_MUTEX, APR_CROSS_PROCESS,signal_name_prefix,pconf);
               exit_event = CreateEvent(NULL, TRUE, FALSE, exit_event_name);
           }
  
  
  

Mime
View raw message