diff options
author | Jeff Trawick <trawick@apache.org> | 2001-11-26 15:38:03 +0100 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2001-11-26 15:38:03 +0100 |
commit | 179c025421accf88f7072c4dcc61ce01b94e104a (patch) | |
tree | 6f8eeb2bdfd5b759e1fdd7b15c808ec6dbda93e9 | |
parent | Another fix for the core_output_filter() code that concatenates (diff) | |
download | apache2-179c025421accf88f7072c4dcc61ce01b94e104a.tar.xz apache2-179c025421accf88f7072c4dcc61ce01b94e104a.zip |
very minor tweaks:
. convert a comment to English
. zap an unnecessary '.' from a log message
. rearrange the setting of some variables controlling pipes and cmd-type
in the cgi process so that the differences in their values for ssi vs. cgi
can be more readily seen
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92177 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | modules/generators/mod_cgid.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 3cb94a11e9..c279b30e8f 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -505,11 +505,11 @@ static int cgid_server(void *data) char *argv0; char **env; const char * const *argv; - apr_int32_t in_pipe = APR_CHILD_BLOCK; - apr_int32_t out_pipe = APR_CHILD_BLOCK; - apr_int32_t err_pipe = APR_CHILD_BLOCK; - apr_cmdtype_e cmd_type = APR_PROGRAM; - request_rec *r; + apr_int32_t in_pipe; + apr_int32_t out_pipe; + apr_int32_t err_pipe; + apr_cmdtype_e cmd_type; + request_rec *r; apr_procattr_t *procattr = NULL; apr_proc_t *procnew = NULL; apr_file_t *inout; @@ -522,7 +522,7 @@ static int cgid_server(void *data) if (errno != EINTR) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, (server_rec *)data, - "Error accepting on cgid socket."); + "Error accepting on cgid socket"); } continue; } @@ -540,6 +540,12 @@ static int cgid_server(void *data) err_pipe = APR_NO_PIPE; cmd_type = APR_SHELLCMD; } + else { + in_pipe = APR_CHILD_BLOCK; + out_pipe = APR_CHILD_BLOCK; + err_pipe = APR_CHILD_BLOCK; + cmd_type = APR_PROGRAM; + } if (((rc = apr_procattr_create(&procattr, ptrans)) != APR_SUCCESS) || ((req_type == CGI_REQ) && @@ -564,8 +570,8 @@ static int cgid_server(void *data) else { argv = (const char * const *)create_argv(r->pool, NULL, NULL, NULL, argv0, r->args); - /* We want to sd2 close for new CGI process too. - * If it's remained open it'll make ap_pass_brigade() block + /* We want to close sd2 for the new CGI process too. + * If it is left open it'll make ap_pass_brigade() block * waiting for EOF if CGI forked something running long. * close(sd2) here should be okay, as CGI channel * is already dup()ed by apr_procattr_child_{in,out}_set() @@ -609,7 +615,6 @@ static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, for (m = ap_preloaded_modules; *m != NULL; m++) total_modules++; - if ((pid = fork()) < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "Couldn't spawn cgid daemon process"); |