]> granicus.if.org Git - apache/commitdiff
Catch up with Brad's changes, this knocks off the CGI popup windows bug
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 6 Jun 2002 00:22:45 +0000 (00:22 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 6 Jun 2002 00:22:45 +0000 (00:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95538 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/arch/win32/mod_win32.c

diff --git a/CHANGES b/CHANGES
index 65b6d51763736e415616fa9c1000be5b4bbf58fb..d659114a77e41477e855ef8fc916b150a574d1ce 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,10 +1,13 @@
 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
index cdc6aabb27f6f79fb038b12601bf5570182a6f26..0884668c09043eb725daebd0611268d922924571 100644 (file)
@@ -69,7 +69,7 @@
 #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
@@ -413,7 +413,7 @@ static apr_array_header_t *split_argv(apr_pool_t *p, const char *interp,
 
 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;
@@ -424,7 +424,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
     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.
          *
@@ -457,8 +457,8 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
                       == 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,
@@ -499,8 +499,8 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
                 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;
                 }
             }
         }
@@ -529,14 +529,12 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
     *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);