apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: Solution to apr stdio/msvc crt/service handles and logging
Date Fri, 28 Sep 2007 17:16:23 GMT
Tom, thank you for the validation!  Jumping lists to pick back up at apr.

There is only one remaining question and I would like some explicit +1's
from the dev@apr committers, please, or your ixnay on the patch for the
sort-of-non-conformance to the versioning policy.

The result is ABI compatible as I mentioned.  The introduction in 1.2.12
of the APR_NO_FILE flag is windows specific, and no more or less portable
than the behaviors in 1.2.9 and previous, but works around this 1.2.10
"surprise" bug fix and back into operation without waiting for the release
of 1.3.0, and *in 1.3.0 we toggle this into a portable behavior contract*.

Without the change;

--- include/apr_thread_proc.h	(revision 579398)
+++ include/apr_thread_proc.h	(working copy)
@@ -87,6 +87,15 @@
 /** @see apr_procattr_io_set */
 #define APR_CHILD_BLOCK      4

+/** @see apr_procattr_io_set
+ * @note introduced strictly for Win32 to apr revision 1.2.12 (to restore
+ * the non-portable default behavior of 1.2.9 and prior versions on Win32).
+ * This becomes portable to all platforms effective revision 1.3.0, ensuring
+ * the standard files specified in the call to apr_procattr_io_set are not
+ * open in the created process (on Win32 as INVALID_HANDLE_VALUEs).
+ */
+#define APR_NO_FILE          8
 /** @see apr_procattr_limit_set */
 #define APR_LIMIT_CPU        0
 /** @see apr_procattr_limit_set */

the only alternative I can picture is to back down to 1.2.9, suffer the
various handle leaks on Win32 until httpd 2.4.0 is released, which I don't
believe is a wise idea.

Votes for the patch?  If -1, votes to revert to 1.2.9?


Tom Donovan wrote:
> William A. Rowe, Jr. wrote:
>> I'd especially appreciate any input from Tom w.r.t. the ease of adding
>> APR_NO_FILE flags to apr_procattr_io_set() members whom are not allowed
>> to have a handle at all, eg. how this works out with mod_fcgid and
>> similar
>> modules.
> The proposed patch works correctly with mod_fcgid v2.2 and with
> mod_fastcgi (the 9/23/2007 snapshot).
> Both modules needed to be changed (of course) to accommodate the new
> APR_NO_FILE requirement. The change was straightforward.
> I tested with the Apache 2.2.6-r2 source + your patch:
>    http://people.apache.org/~wrowe/apr-1.2-win32-nohandle.patch
> on Win2k. Both VC6 and VC8 builds.
> Also added comments to httpd bug 43329.  I'll ping both sets of
> developers to see when they can make the necessary changes to their
> modules.
> -tom-

View raw message