From: Jean-Jacques Clar Date: Fri, 9 Jul 2004 20:28:48 +0000 (+0000) Subject: Overloading detached field in cgi_exec_info_t stuct in order to use same field to... X-Git-Tag: pre_ajp_proxy~89 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2e3f862322800ead216cff952b5646186d1492b;p=apache Overloading detached field in cgi_exec_info_t stuct in order to use same field to set detached and addrspace values for proc to be started. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104209 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/arch/netware/mod_netware.c b/modules/arch/netware/mod_netware.c index f392e7b5c7..ed8f567f88 100644 --- a/modules/arch/netware/mod_netware.c +++ b/modules/arch/netware/mod_netware.c @@ -141,6 +141,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, /* check if we have a registered command for the extension*/ new_cmd = apr_table_get(d->file_type_handlers, ext); + e_info->detached = 1; if (new_cmd == NULL) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "Could not find a command associated with the %s extension", ext); @@ -153,12 +154,11 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, /* Run in its own address space if specified */ if(apr_table_get(d->file_handler_mode, ext)) - e_info->addrspace = 1; + e_info->detached |= 2; } /* Tokenize the full command string into its arguments */ apr_tokenize_to_argv(*cmd, (char***)argv, p); - e_info->detached = 1; /* The first argument should be the executible */ *cmd = ap_server_root_relative(p, *argv[0]); diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index 5e93272027..3f656c8b5d 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -433,7 +433,7 @@ 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) || + e_info->detached)) != 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, @@ -790,7 +790,6 @@ 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) { @@ -1058,7 +1057,6 @@ 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) { diff --git a/modules/generators/mod_cgi.h b/modules/generators/mod_cgi.h index 96fbe09f0c..c28b486bfc 100644 --- a/modules/generators/mod_cgi.h +++ b/modules/generators/mod_cgi.h @@ -31,7 +31,6 @@ typedef struct { apr_bucket_brigade **bb; include_ctx_t *ctx; ap_filter_t *next; - apr_int32_t addrspace; } cgi_exec_info_t; /**