httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject Re: DSO Patch 1 of 3 (+ commentary!)
Date Wed, 29 Mar 2000 17:00:53 GMT

I have posted how to get "errno junior" into APR.  For any function that
wants to output this error message, you create an OS/390 version of the
function which writes it out to stderr.  This is not a portable soultion,
but this isn't a portable problem AFAICT, so it doesn't require a portable
solution.

> I like Jeff's idea of providing a function pointer to APR which knows
> how to deal with/log any additional error info.  That has a couple of
> advantages:  

And some major disadvantages.  There is no good way to do it.  If you add
a function pointer to the context, you also have to add an error file,
because you can't just write to stderr portably.  You also have to add the
log level, because many people do not want to see this much information in
their error_logs.  It is just not portable.

> Ideally we would pass this function the name of the failing system
> call.  We're in an error path anyway when this happens, so pathlength
> isn't a concern.  The error handler could test the name of the failing
> call to figure out what to do, or simply log this name.

A bigger problem then the name of the failing system call, is the function
that got you to the failing system call.  Knowing that bind failed doesn't
do you any good unless you know which bind call failed.  At this point,
you are passing down App inforation that shouldn't be found in APR.  This
is why the app is in charge of logging the error, not APR.  If it is
a platform specific concept that you want to log, put it in platform
specific code, and don't try to be portable about it.  This is why APR has
different directories for different platforms.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message