Changes with Apache 2.0.18-dev
+ *) Fix command-line processing so that if a bad argument is specified
+ Apache will exit. [Jeff Trawick]
+
*) Change the make targets and rules to be consistent in all of the
Apache-owned source trees. [Roy Fielding]
apr_pool_t *ptemp; /* Pool for temporary config stuff, reset often */
apr_pool_t *pcommands; /* Pool for -D, -C and -c switches */
apr_getopt_t *opt;
+ apr_status_t rv;
module **mod;
const char *optarg;
*/
apr_getopt_init(&opt, pcommands, process->argc, process->argv);
- while (apr_getopt(opt, AP_SERVER_BASEARGS, &c, &optarg)
+ while ((rv = apr_getopt(opt, AP_SERVER_BASEARGS, &c, &optarg))
== APR_SUCCESS) {
char **new;
switch (c) {
case 't':
configtestonly = 1;
break;
- case '?':
case 'h':
usage(process);
}
}
+ if (rv != APR_EOF) { /* bad cmdline option */
+ usage(process);
+ }
+
apr_pool_create(&plog, pglobal);
apr_pool_create(&ptemp, pconf);