httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <>
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:


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 Stoddard

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

View raw message