]> granicus.if.org Git - apache/commitdiff
very minor tweaks:
authorJeff Trawick <trawick@apache.org>
Mon, 26 Nov 2001 14:38:03 +0000 (14:38 +0000)
committerJeff Trawick <trawick@apache.org>
Mon, 26 Nov 2001 14:38:03 +0000 (14:38 +0000)
. 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

modules/generators/mod_cgid.c

index 3cb94a11e954f7f2552b99b3582d52bab80a8446..c279b30e8fa2cb7f99ea684ccad50c9de17462e5 100644 (file)
@@ -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");