diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2007-08-26 21:19:55 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2007-08-26 21:19:55 +0000 |
commit | 5f935855a9c9049b7452e3e878ba89a47f3615ed (patch) | |
tree | 7e10e97cc344302150281937027bc58a63941ca9 /misc/win32 | |
parent | 681799936098f6ef898e76979c20e84230e1d923 (diff) | |
download | libapr-5f935855a9c9049b7452e3e878ba89a47f3615ed.tar.gz |
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
Diffstat (limited to 'misc/win32')
-rw-r--r-- | misc/win32/start.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; } |