]> granicus.if.org Git - apache/commitdiff
Added new field in apr_procattr_t and cgi_exec_info_t structures to support loading...
authorJean-Jacques Clar <clar@apache.org>
Mon, 14 Jun 2004 17:28:25 +0000 (17:28 +0000)
committerJean-Jacques Clar <clar@apache.org>
Mon, 14 Jun 2004 17:28:25 +0000 (17:28 +0000)
Replaced changes that added APR_PROGRAM_ADDRSPACE committed 6/11/04.
Reviewed by Brad Nicholes

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103946 13f79535-47bb-0310-9956-ffa450edef68

modules/arch/netware/mod_netware.c
modules/generators/mod_cgi.c
modules/generators/mod_cgi.h

index 3aa110b883712ded54fb315ca45133ca083ff663..f392e7b5c77a20fdcc55503dac407f1fefc4553b 100644 (file)
@@ -99,7 +99,6 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
     char *ext = NULL;
     char *cmd_only, *ptr;
     const char *new_cmd;
-    const char *detached = NULL;
     netware_dir_config *d;
     apr_file_t *fh;
     const char *args = "";
@@ -153,13 +152,8 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
         *cmd = apr_pstrcat (p, new_cmd, " ", cmd_only, NULL);
 
         /* Run in its own address space if specified */
-        detached = apr_table_get(d->file_handler_mode, ext);
-        if (detached) {
-            e_info->cmd_type = APR_PROGRAM_ADDRSPACE;
-        }
-        else {
-            e_info->cmd_type = APR_PROGRAM;
-        }
+        if(apr_table_get(d->file_handler_mode, ext))
+            e_info->addrspace = 1;
     }
 
     /* Tokenize the full command string into its arguments */
index 255878bb6f38dab23c337abfd4e0d2d6afc80a28..5e93272027df2562a6e3899698fdd962b859999c 100644 (file)
@@ -432,6 +432,8 @@ static apr_status_t run_cgi_child(apr_file_t **script_out,
 
         ((rc = apr_procattr_detach_set(procattr,
                                         e_info->detached)) != APR_SUCCESS) ||
+        ((rc = apr_procattr_addrspace_set(procattr,
+                                        e_info->addrspace)) != APR_SUCCESS) ||
         ((rc = apr_procattr_child_errfn_set(procattr, cgi_child_errfn)) != APR_SUCCESS)) {
         /* Something bad happened, tell the world. */
         ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
@@ -788,6 +790,7 @@ static int cgi_handler(request_rec *r)
     e_info.bb          = NULL;
     e_info.ctx         = NULL;
     e_info.next        = NULL;
+    e_info.addrspace   = 0;
 
     /* build the command line */
     if ((rv = cgi_build_command(&command, &argv, r, p, &e_info)) != APR_SUCCESS) {
@@ -1055,6 +1058,7 @@ static apr_status_t include_cmd(include_ctx_t *ctx, ap_filter_t *f,
     e_info.bb          = &bb;
     e_info.ctx         = ctx;
     e_info.next        = f->next;
+    e_info.addrspace   = 0;
 
     if ((rv = cgi_build_command(&command, &argv, r, r->pool,
                                 &e_info)) != APR_SUCCESS) {
index c28b486bfce7fcc9badd62c143537ca7723c1eac..96fbe09f0c2fde0b308abf1b84c095207c37200a 100644 (file)
@@ -31,6 +31,7 @@ typedef struct {
     apr_bucket_brigade **bb;
     include_ctx_t       *ctx;
     ap_filter_t         *next;
+    apr_int32_t          addrspace;
 } cgi_exec_info_t;
 
 /**