From 5f935855a9c9049b7452e3e878ba89a47f3615ed Mon Sep 17 00:00:00 2001 From: wrowe Date: Sun, 26 Aug 2007 21:19:55 +0000 Subject: Proposed; Solve win32 inherited pipe leaks by leveraging OS2 port's solution. Mutex the pipe manipulation on WinNT+++ alone (not WinCE, nor 9x) so that we toggle the inherited state of the stdin/out/err pipes. This is only possible on NT, because in CE/9x it would involve replacing the pipe handles all over the place as there is no toggle. This CRITICAL_SECTION pipe is incredibly fast in the mainline case, and only introduces contention in the threaded server after startup (for cgi, etc). Not unlike an in-process cgid. So, leave WinCE alone for now, since it doesn't follow the stdio model, and leave Win9x alone for good, as nearly abandoned. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@569882 13f79535-47bb-0310-9956-ffa450edef68 --- misc/win32/start.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'misc/win32') diff --git a/misc/win32/start.c b/misc/win32/start.c index 6be557e02..22820e8e5 100644 --- a/misc/win32/start.c +++ b/misc/win32/start.c @@ -22,7 +22,8 @@ #include "apr_arch_misc.h" /* for WSAHighByte / WSALowByte */ #include "wchar.h" -#include "apr_arch_file_io.h" +#include "apr_arch_file_io.h" /* bring in unicode-ness */ +#include "apr_arch_threadproc.h" /* bring in apr_threadproc_init */ #include "assert.h" /* This symbol is _private_, although it must be exported. @@ -204,6 +205,8 @@ APR_DECLARE(apr_status_t) apr_initialize(void) apr_signal_init(pool); + apr_threadproc_init(pool); + return APR_SUCCESS; } -- cgit v1.2.1