httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: cvs commit: httpd-2.0/server config.c
Date Tue, 02 Jan 2001 20:28:30 GMT

> >   Modified:    server   config.c
> >   Log:
> >   When we are starting the server, we have a pool that can be used to open
> >   the error log.  Rather than try to log a regular error, log an error with
> >   the pool that we have, so that we can open stderr successfully.
> 
> I'm a bit uncomfortable with this direction.  
> 
> Shouldn't main() make some explicit call to explicitly set up the
> stderr log file and avoid the need to change the log calls?  As it is,
> we'll be converting ap_log_error() calls over time as folks find
> segfaults in obscure paths at initialization.

The core does make an explicit call to setup the stderr log file.  The
problem is finding the error log when we don't have a server_rec.  We
can't just use stderr, because on Windows, we don't have stderr.  There
are definite problems with this direction, but since we can't use NULL
pools we need to get a pool from someplace.  I had hoped that we would
have access to some global pool, which could be used for this, but
unfortunately, all of the global pools were removed.

Then I had hoped that we could use something from the process_rec, but
that too isn't global.  While I agree that globals are in general a bad
idea, in some cases, they are incredibly useful.  :-(

> Also (maybe you can confirm for me), I'm not 100% sure this need is
> limited to Apache core code.  I fear that third-party modules must
> also know when to call ap_log_perror().

This should just be core code, and those modules that implement pre_config
functions.  Once we get to the post_config phase, we have a
server_rec.  As for the config directives, those should be returning the
log messages to the caller, so those shouldn't be an issue.  Of course,
there has already been one problem reported to me, and I am looking into
how to fix it, although I don't see a good solution.

Basically, when we determine that we can't setgid to (unsigned int)-1, we
seg fault.  We don't have a pool in this code, so we can't just convert to
ap_log_perror.  I am really close to a loss as far as how to solve this.

Ryan

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


Mime
View raw message