Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 5931 invoked by uid 6000); 1 Dec 1997 11:59:42 -0000 Received: (qmail 5925 invoked from network); 1 Dec 1997 11:59:40 -0000 Received: from eastwood.aldigital.algroup.co.uk (194.128.162.193) by taz.hyperreal.org with SMTP; 1 Dec 1997 11:59:40 -0000 Received: from freeby.ben.algroup.co.uk (freeby.ben.algroup.co.uk [193.133.15.6]) by eastwood.aldigital.algroup.co.uk (8.6.12/8.6.12) with ESMTP id LAA12970 for ; Mon, 1 Dec 1997 11:58:54 GMT Received: from algroup.co.uk (naughty.ben.algroup.co.uk [193.133.15.107]) by freeby.ben.algroup.co.uk (8.6.12/8.6.12) with ESMTP id LAA04949 for ; Mon, 1 Dec 1997 11:58:36 GMT Message-ID: <3482A65E.76F686F3@algroup.co.uk> Date: Mon, 01 Dec 1997 11:58:22 +0000 From: Ben Laurie Organization: A.L. Digital Ltd. X-Mailer: Mozilla 4.04 [en] (WinNT; I) MIME-Version: 1.0 To: new-httpd@apache.org Subject: Re: [PATCH] Proper reporting of Win32 errors References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org Paul Sutton wrote: > > On Mon, 1 Dec 1997, Ben Laurie wrote: > > Paul Sutton wrote: > > > The patch below updates aplog_error() to enable generic logging of > > > Win32 errors to the same place as other errors. It adds a new flag, > > > APLOG_WIN32ERROR which if given in the _second_ argument to aplog_error() > > > causes the Win32 error code and error string to be logged. Here is an > > > example call (this is from worker_main()): > > > > Good plan, but I wonder whether we should always log the Win32 error > > (unless APLOG_NOERRNO is set, of course), rather than having to > > explicitly flag it? > > I don't think so, since most of our calls are to C runtime libary stuff > which sets errno and doesn't use GetLastError(). Not that I've tested > this, but none of the C runtime man pages (er, SDK docs) mention > GetLastError() for error conditions. The C runtime still uses Windoze functions underneath, which do use SetLastError(), so I suspect that useful information is generally added by using GetLastError(). Cheers, Ben. -- Ben Laurie |Phone: +44 (181) 735 0686|Apache Group member Freelance Consultant |Fax: +44 (181) 735 0689|http://www.apache.org and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author A.L. Digital Ltd, |http://www.algroup.co.uk/Apache-SSL London, England. |"Apache: TDG" http://www.ora.com/catalog/apache