Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Delivered-To: mailing list new-httpd@apache.org Delivered-To: moderator for new-httpd@apache.org Received: (qmail 26619 invoked from network); 15 Feb 2000 20:00:27 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by locus.apache.org with SMTP; 15 Feb 2000 20:00:27 -0000 Received: (qmail 6406 invoked from network); 15 Feb 2000 20:00:26 -0000 Received: from web1.ntrnet.net (206.66.160.5) by taz.hyperreal.org with SMTP; 15 Feb 2000 20:00:26 -0000 Received: from mail.ntrnet.net (mail.ntrnet.net [206.66.160.4]) by web1.ntrnet.net (8.8.5/8.8.5) with ESMTP id PAA09722 for ; Tue, 15 Feb 2000 15:00:25 -0500 Received: from shell.ntrnet.net (squid.ntrnet.net [206.66.160.7]) by mail.ntrnet.net (Postfix) with ESMTP id 2ADDF7680A for ; Tue, 15 Feb 2000 15:00:25 -0500 (EST) Received: (from rbb@localhost) by shell.ntrnet.net (8.8.5/8.8.5) id PAA11348; Tue, 15 Feb 2000 15:00:24 -0500 Date: Tue, 15 Feb 2000 15:00:24 -0500 (EST) From: rbb@apache.org X-Sender: rbb@shell.ntrnet.net To: new-httpd@apache.org Subject: Re: dup2() on Windows In-Reply-To: <019101bf77df$c0c43640$064b2509@raleigh.ibm.com> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: rbb@shell.ntrnet.net > 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() > I hate the whole idea of these functions. :-) The fact that they are necessary is absolutely horrid. I question if they really are. Are you telling me, if I have two open handles on Windows, I can't make them point to the same file? That is ludicrous, IMHO. Regardless, is the dup2 semantic important to Windows? Can we accomplish the same thing with the other semantic of ap_dupfile? I'm just asking, not having a Windows box right now, I can't really investigate much. However, if we add ap_dup2std(err|in|out), those functions will always be in APR, so I am -1 for adding those to APR. I would rather see #ifdefs in http_log until M$ wakes up and adds some functions to their API. Ryan Come to the first official Apache Software Foundation Conference!!! _______________________________________________________________________________ Ryan Bloom rbb@ntrnet.net 2121 Stonehenge Dr. Apt #3 Raleigh, NC 27615 Ryan Bloom -- thinker, adventurer, artist, writer, but mostly, friend. -------------------------------------------------------------------------------