httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject [Patches] two options for filedup.
Date Fri, 21 Mar 2003 22:49:42 GMT
Here are two patches that address the current bug, for comparison.

apr_dupfix.patch keeps the cleanup_kill -> dup2 -> register_cleanup
logic that protects us from dup2'ing into an apr_file_close()ed fd.

apr_duprevert.patch keeps the reorganization of the code, but drops
the cleanup_kill and register_cleanup in the dup2 case, in favor of 
trusting the current cleanups (and that they correpond to ->flags.)

I honestly like the second patch better, only if we agree to not support
apr_file_dup2()ing into any apr_file_t that's already been apr_file_close()d.
Supporting that behavior will be a PITA on Win32.

In *BOTH* patches we revert apr_file_dup() assumption that fd 0..2 are 
inherited, to reflect Jeff's concern with that change.

Please express a preference and I'll commit the favored patch and
test on OS/X prior to T&R of 0.9.2.

View raw message