httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/winnt mpm_winnt.c
Date Mon, 11 Feb 2002 23:34:11 GMT
wrowe       02/02/11 15:34:11

  Modified:    server/mpm/winnt mpm_winnt.c
  Log:
    Move the sleep until after we have duplicated the simple handles.  We must
    still pause and reflect on the Child's startup before WSADuplicateHandle()
  
  Revision  Changes    Path
  1.234     +10 -10    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.233
  retrieving revision 1.234
  diff -u -r1.233 -r1.234
  --- mpm_winnt.c	11 Feb 2002 20:32:04 -0000	1.233
  +++ mpm_winnt.c	11 Feb 2002 23:34:10 -0000	1.234
  @@ -1587,16 +1587,6 @@
                          NULL,
                          &si, &pi);
   
  -    /* Important:
  -     * Give the child process a chance to run before dup'ing the sockets.
  -     * We have already set the listening sockets noninheritable, but if 
  -     * WSADuplicateSocket runs before the child process initializes
  -     * the listeners will be inherited anyway.
  -     *
  -     * XXX: This is badness; needs some mutex interlocking
  -     */
  -    Sleep(1000);
  -
       /* Undo everything we created for the child only
        */
       CloseHandle(pi.hThread);
  @@ -1627,6 +1617,16 @@
           CloseHandle(hPipeWrite);
           return -1;
       }
  +
  +    /* Important:
  +     * Give the child process a chance to run before dup'ing the sockets.
  +     * We have already set the listening sockets noninheritable, but if 
  +     * WSADuplicateSocket runs before the child process initializes
  +     * the listeners will be inherited anyway.
  +     *
  +     * XXX: This is badness; needs some mutex interlocking
  +     */
  +    Sleep(1000);
   
       if (send_listeners_to_child(p, pi.dwProcessId, hPipeWrite)) {
           CloseHandle(hPipeWrite);        
  
  
  

Mime
View raw message