Changes with Apache 2.0.37
+ *) Added the "detached" attribute to the cgi_exec_info_t internals
+ so that Win32 and Netware won't create a new window or console
+ for each CGI invoked. PR 8387
+ [Brad Nicholes, William Rowe]
+
*) Consolidated the command line parameters and attributes that are
- manipulated by the optional function ap_cgi_build_command() in
- mod_cgi into a single structure. Also added a "detached" attribute
- to the structure so that in addition to building the command
- line, each OS can specify how the CGI binary should be launched.
+ manipulated by the optional function ap_cgi_build_command() in
+ mod_cgi into a single structure.
[Brad Nicholes]
*) Get rid of uninitialized value errors with "apxs -q" on certain
#include "http_log.h"
#include "util_script.h"
#include "mod_core.h"
-#include "apr_optional.h"
+#include "mod_cgi.h"
#include "apr_lib.h"
#ifdef WIN32
static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
request_rec *r, apr_pool_t *p,
- int process_cgi, apr_cmdtype_e *type)
+ cgi_exec_info_t *e_info)
{
const char *ext = NULL;
const char *interpreter = NULL;
d = (win32_dir_conf *)ap_get_module_config(r->per_dir_config,
&win32_module);
- if (process_cgi) {
+ if (e_info->cmd_type) {
/* Handle the complete file name, we DON'T want to follow suexec, since
* an unrooted command is as predictable as shooting craps in Win32.
*
== INTERPRETER_SOURCE_REGISTRY_STRICT);
interpreter = get_interpreter_from_win32_registry(r->pool, ext,
strict);
- if (interpreter && *type != APR_SHELLCMD) {
- *type = APR_PROGRAM_PATH;
+ if (interpreter && e_info->prog_type != APR_SHELLCMD) {
+ e_info->prog_type = APR_PROGRAM_PATH;
}
else {
ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server,
while (isspace(*interpreter)) {
++interpreter;
}
- if (*type != APR_SHELLCMD) {
- *type = APR_PROGRAM_PATH;
+ if (e_info->prog_type != APR_SHELLCMD) {
+ e_info->prog_type = APR_PROGRAM_PATH;
}
}
}
*argv = (const char **)(split_argv(p, interpreter, *cmd,
args)->elts);
*cmd = (*argv)[0];
+
+ e_info->detached = 1;
+
return APR_SUCCESS;
}
-APR_DECLARE_OPTIONAL_FN(apr_status_t, ap_cgi_build_command,
- (const char **cmd, const char ***argv,
- request_rec *r, apr_pool_t *p,
- int replace_cmd, apr_cmdtype_e *type));
-
static void register_hooks(apr_pool_t *p)
{
APR_REGISTER_OPTIONAL_FN(ap_cgi_build_command);