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);
ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Parent: Created child process %d", pi.dwProcessId);
- /* 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_handles_to_child(p, *child_exit_event, pi.hProcess, hPipeWrite)) {
CloseHandle(hPipeWrite);
return -1;