httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <>
Subject Re: fprintf(stderr in Apache and APR.
Date Tue, 16 Nov 1999 03:36:49 GMT
On Mon, 15 Nov 1999, Ryan Bloom wrote:
> 1)  Re-write all the apr functions to follow the return a defined status
> code.

Uh... could you rephrase (1) ? I'm not parsing it...

> 2)  Return a different error condition for each return statement.  (i.e.
> -1, -2, -3, etc)
> 3)  Leave it alone and use fprintf(stderr, excepting that this doesn't
> work properly on Windows.

4) have a platform-specific error reporting function.
   On Win32: it goes to the event log and/or a log file
   On *nix: it goes to stderr

Where you can't return a status code, but must report an error and exit 
(e.g. malloc failure), then you can use the system error function.

Of course, the words "platform-specific" means that the function goes into
APR :-) and that APR can use it when necessary.

I also believe that you should add a similar function, but it would be
used for debugging messages. On Win32, it would go to DebugString(), on
*nix, it would go to stderr.

In all cases, more refined status codes would be a good addition.


Greg Stein,

View raw message