From 7ec1d6730c3258537ac5dcd88b3f70df032f255e Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Fri, 22 Mar 2002 06:09:39 +0000 Subject: [PATCH] Trace the invoked command when we use CreateProcess()-style emulation 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 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index 9e291f5f9b..6f625970bf 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -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; -- 2.40.0