]> granicus.if.org Git - apache/commitdiff
Trace the invoked command when we use CreateProcess()-style emulation
authorWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 22 Mar 2002 06:09:39 +0000 (06:09 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 22 Mar 2002 06:09:39 +0000 (06:09 +0000)
  of execxx() for apr_proc_create().

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

modules/generators/mod_cgi.c

index 9e291f5f9b798449c1e97218e7b9d3a637f8d416..6f625970bff739595a8153950ff5bf68efe7298a 100644 (file)
@@ -464,12 +464,29 @@ static apr_status_t run_cgi_child(apr_file_t **script_out,
     
         if (rc != APR_SUCCESS) {
             /* Bad things happened. Everyone should have cleaned up. */
+#if APR_HAS_PROC_INVOKED
+            if (procnew->invoked) {
+                ap_log_rerror(APLOG_MARK, APLOG_INFO, rc, r,
+                              "mod_cgi: failed to invoke process: %s", 
+                              procnew->invoked);
+            }
+            else
+#endif
             ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
-                        "couldn't create child process: %d: %s", rc, r->filename);
+                          "mod_cgi: couldn't create child process: %s",
+                          r->filename);
         }
         else {
             apr_pool_note_subprocess(p, procnew, APR_KILL_AFTER_TIMEOUT);
 
+#if APR_HAS_PROC_INVOKED
+            if (procnew->invoked) {
+                ap_log_rerror(APLOG_MARK, APLOG_INFO, rc, r,
+                              "mod_cgi invoked process: %s", 
+                              procnew->invoked);
+            }
+#endif
+
             *script_in = procnew->out;
             if (!*script_in)
                 return APR_EBADF;