httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: environment variable settings are bad
Date Tue, 09 Jan 2001 04:14:19 GMT
On Mon, Jan 08, 2001 at 07:45:48PM -0800, rbb@covalent.net wrote:
> 
> > >  Apache-2.0 has this feature
> > >  already, if you run it with the environment variable NO_DETACH set.
> > 
> > Claim: behaviours like this controlled by random environment 
> > variables are evil and are a symptom of the lack of a better way to
> > pass this sort of info to the places that need it.
> > 
> > Anyone agree or am I crazy?

I completely agree. It is a pain in the ass to start a program, have it do
something wonky, and then realize that an environment variable exists in
that particular shell, which you started three months before. Totally sucks.

> The original plan had been, I believe, to use the -D command line argument
> to Apache.  However, we don't actually set environment variables with the
> -D stuff, so that doesn't work.

Why use the environment? Put together a hash table with -D name[=value]
information, and shove that into the process_rec. MPMs (or anything for that
matter) can inspect the hash table.

> We could just check our own env table,
> the one we set with -D, but if we are going to do that, then why didn't we
> just stick with -X and use -N for no_detach?

To stop the switch explosion. -X and -N only apply to specific MPMs, too. A
more general MPM-ignorant mechanism is needed.


I'd lobby for the hash table of options.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message