httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/modules/generators mod_cgid.c
Date Mon, 31 Mar 2003 04:51:36 GMT
wrowe       2003/03/30 20:51:36

  Modified:    modules/generators Tag: APACHE_2_0_BRANCH mod_cgid.c
  Log:
    Solve segfaults from unusual error exceptions in cgid.  The daemon
    has no 'real' request_rec, so we can't use ap_log_rerror() anywhere
    within the cgid_server() code.
  
    Also, one of the two log messages was echoed to the child, no point
    when the actual request logic should take care of that notification.
  
  Submitted by:	Jeff Trawick
  Reviewed by:	Bill Rowe, Brian Pane
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.145.2.4 +12 -6     httpd-2.0/modules/generators/mod_cgid.c
  
  Index: mod_cgid.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgid.c,v
  retrieving revision 1.145.2.3
  retrieving revision 1.145.2.4
  diff -u -r1.145.2.3 -r1.145.2.4
  --- mod_cgid.c	27 Feb 2003 12:33:08 -0000	1.145.2.3
  +++ mod_cgid.c	31 Mar 2003 04:51:36 -0000	1.145.2.4
  @@ -735,8 +735,11 @@
               ((rc = apr_procattr_cmdtype_set(procattr, cmd_type)) != APR_SUCCESS) ||
               ((rc = apr_procattr_child_errfn_set(procattr, cgid_child_errfn)) != APR_SUCCESS))
{
               /* Something bad happened, tell the world. */
  -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
  -                      "couldn't set child process attributes: %s", r->filename);
  +             * ap_log_rerror() won't work because the header table used by
  +             * ap_log_rerror() hasn't been replicated in the phony r
  +             */
  +            ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server,
  +                         "couldn't set child process attributes: %s", r->filename);
           }
           else {
               apr_pool_userdata_set(r, ERRFN_USERDATA_KEY, apr_pool_cleanup_null, ptrans);
  @@ -757,10 +760,13 @@
                                                    procattr, ptrans);
   
               if (rc != APR_SUCCESS) {
  -                /* Bad things happened. Everyone should have cleaned up. */
  -                ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rc, r,
  -                              "couldn't create child process: %d: %s", rc, 
  -                              apr_filename_of_pathname(r->filename));
  +                /* Bad things happened. Everyone should have cleaned up.
  +                 * ap_log_rerror() won't work because the header table used by
  +                 * ap_log_rerror() hasn't been replicated in the phony r
  +                 */
  +                ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server,
  +                             "couldn't create child process: %d: %s", rc, 
  +                             apr_filename_of_pathname(r->filename));
               }
               else {
                   apr_hash_set(script_hash, &cgid_req.conn_id, sizeof(cgid_req.conn_id),

  
  
  

Mime
View raw message