httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: [PATCH] Proper reporting of Win32 errors
Date Mon, 01 Dec 1997 11:58:22 GMT
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

Mime
View raw message