httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <stodd...@raleigh.ibm.com>
Subject dup2() on Windows
Date Tue, 15 Feb 2000 18:09:08 GMT
Windows does not support a native (non-POSIX) equivalent to dup2, which
means that ap_dupfile() cannot be correctly implemented in APR on Windows.
(ap_dupfile() does a dup or dup2 under the covers, depending on the
arguments passed in. We cannot handle the dup2 case in Windows). Thus,
ap_open_logs is broken for Windows.

I have two solutions available. I can use #ifdef WIN32 blocks in
ap_open_file(), or extend APR with the following new functions:

ap_dup2stderr()
ap_dup2stdin()
ap_dup2stdout()

Windows supports a dup2 like function for the standard I/O functions.
Apache primarily uses dup2 to hook the stdio handles, so this should work
well for Posix implementation of Apache as well.

If I hear no objections (and we don't come up with anything better), I'll
implement this in APR.

Bill

________________________________________________
Bill Stoddard stoddard@raleigh.ibm.com

Come to the first official Apache Software Foundation
Conference!  <http://ApacheCon.Com/>




Mime
View raw message