httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@telebusiness.co.nz>
Subject Re: [PATCH] add -C and -c switches (take 2)
Date Wed, 07 Jan 1998 20:24:39 GMT
Martin Kraemer wrote:

> On Wed, Jan 07, 1998 at 09:08:29PM +1300, Doug MacEachern wrote:
> > +    fprintf(stderr, "Usage: %s [-d directory] [-f file] [-C|-c command] [-v] [-h]
[-l]\n", bin);
> > ...
> > +    fprintf(stderr, "-C command : process command before reading config files\n");
> > +    fprintf(stderr, "-c command : process command after reading config files\n");
>
> Shouldn't "command" be called "directive"?

Well, the string passed to handle_command is a directive and it's args, which together make
a command,
right?  Plus, -c -C is the first letter of command :-)

> > +void process_command_config(server_rec *s, array_header *arr, pool *p, pool *ptemp)
> > +{
> > ...
> > +#ifdef MOD_PERL
> > +     if(!(strncmp(line, "PerlModule ", 11))) {
> > ...
> > +         errmsg = perl_cmd_module(&parms, s->lookup_defaults, line);
> > +
> > +         if (!errmsg)
> > +             continue;
>
> Does perl_cmd_module() print the errmsg string already? And are
> the returned errors assumed to be non-fatal?

actually, perl will die a fatal death, exit, etc. if there's an error message.  I should have
just
made that:       (void)perl_cmd_module(&parms, s->lookup_defaults, line);

as it was in the -M patch.

> > +     }
> > +#endif
>
> >  void process_resource_config(server_rec *s, char *fname, pool *p, pool *ptemp)
> >  {
> >      const char *errmsg;
> > @@ -909,6 +946,7 @@
> >      fname = server_root_relative(p, fname);
> >
> >      if (!(strcmp(fname, server_root_relative(p, RESOURCE_CONFIG_FILE))) ||
> > +     !(strcmp(fname, server_root_relative(p, SERVER_CONFIG_FILE)))   ||
>
> Ahh! So you can now start apache with none of the default config locations!
> Just a bunch of "-c directive" switches?

Yup, or just one, e.g.

 httpd -C "PerlModule Apache::httpd_conf"

-Doug


Mime
View raw message