Skip to content

Commit 50a7a17

Browse files
author
Jean-Jacques Clar
committed
Added new field in apr_procattr_t and cgi_exec_info_t structures to support loading in current or new address space (NetWare ONLY).
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
1 parent b97d80e commit 50a7a17

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

modules/arch/netware/mod_netware.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
9999
char *ext = NULL;
100100
char *cmd_only, *ptr;
101101
const char *new_cmd;
102-
const char *detached = NULL;
103102
netware_dir_config *d;
104103
apr_file_t *fh;
105104
const char *args = "";
@@ -153,13 +152,8 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
153152
*cmd = apr_pstrcat (p, new_cmd, " ", cmd_only, NULL);
154153

155154
/* Run in its own address space if specified */
156-
detached = apr_table_get(d->file_handler_mode, ext);
157-
if (detached) {
158-
e_info->cmd_type = APR_PROGRAM_ADDRSPACE;
159-
}
160-
else {
161-
e_info->cmd_type = APR_PROGRAM;
162-
}
155+
if(apr_table_get(d->file_handler_mode, ext))
156+
e_info->addrspace = 1;
163157
}
164158

165159
/* Tokenize the full command string into its arguments */

modules/generators/mod_cgi.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,8 @@ static apr_status_t run_cgi_child(apr_file_t **script_out,
432432

433433
((rc = apr_procattr_detach_set(procattr,
434434
e_info->detached)) != APR_SUCCESS) ||
435+
((rc = apr_procattr_addrspace_set(procattr,
436+
e_info->addrspace)) != APR_SUCCESS) ||
435437
((rc = apr_procattr_child_errfn_set(procattr, cgi_child_errfn)) != APR_SUCCESS)) {
436438
/* Something bad happened, tell the world. */
437439
ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
@@ -788,6 +790,7 @@ static int cgi_handler(request_rec *r)
788790
e_info.bb = NULL;
789791
e_info.ctx = NULL;
790792
e_info.next = NULL;
793+
e_info.addrspace = 0;
791794

792795
/* build the command line */
793796
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,
10551058
e_info.bb = &bb;
10561059
e_info.ctx = ctx;
10571060
e_info.next = f->next;
1061+
e_info.addrspace = 0;
10581062

10591063
if ((rv = cgi_build_command(&command, &argv, r, r->pool,
10601064
&e_info)) != APR_SUCCESS) {

modules/generators/mod_cgi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ typedef struct {
3131
apr_bucket_brigade **bb;
3232
include_ctx_t *ctx;
3333
ap_filter_t *next;
34+
apr_int32_t addrspace;
3435
} cgi_exec_info_t;
3536

3637
/**

0 commit comments

Comments
 (0)