You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2002/03/22 07:09:39 UTC

cvs commit: httpd-2.0/modules/generators mod_cgi.c

wrowe       02/03/21 22:09:39

  Modified:    modules/generators mod_cgi.c
  Log:
    Trace the invoked command when we use CreateProcess()-style emulation
    of execxx() for apr_proc_create().
  
  Revision  Changes    Path
  1.125     +18 -1     httpd-2.0/modules/generators/mod_cgi.c
  
  Index: mod_cgi.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgi.c,v
  retrieving revision 1.124
  retrieving revision 1.125
  diff -u -r1.124 -r1.125
  --- mod_cgi.c	20 Mar 2002 17:41:54 -0000	1.124
  +++ mod_cgi.c	22 Mar 2002 06:09:39 -0000	1.125
  @@ -464,11 +464,28 @@
       
           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)