httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <>
Subject Re: dup2() on Windows
Date Thu, 17 Feb 2000 18:54:49 GMT
> >> 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()
> Why not just check the argument to see if the fd matches one of the
> standard handles and allow it for those cases, returning an error on
> win32 for the others?
That'll work, although it is not very efficient. On Windows, I cannot rely
on the value of the standard handles, so I need to call
GetStdHandle(STD_ERROR_HANDLE). I don't think we call dup2 on the request
processing path, so performance is probably not an issue.


View raw message