You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@locus.apache.org on 2000/10/18 08:09:11 UTC

cvs commit: apache-2.0/src/main http_log.c

rbb         00/10/17 23:09:10

  Modified:    src      CHANGES
               src/lib/apr/include apr_thread_proc.h
               src/lib/apr/threadproc/unix proc.c
               src/main http_log.c
  Log:
  Fix piped logs in 2.0.  This basically:
  1) cleans up an annoying type that was getting in my way while I was
     trying to fix things.
  2) Makes some of the allocations pcalloc instead of palloc
  3) The arg array passed to create_process is a const *char *, not
     const *char [].
  PR:     6642
  
  Revision  Changes    Path
  1.282     +2 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.281
  retrieving revision 1.282
  diff -u -r1.281 -r1.282
  --- CHANGES	2000/10/18 04:50:24	1.281
  +++ CHANGES	2000/10/18 06:09:07	1.282
  @@ -1,4 +1,6 @@
   Changes with Apache 2.0a8
  +  *) Piped logs work again in the 2.0 series.
  +     [Ryan Bloom]
   
     *) Restore functionality broken by the mod_rewrite security fix:
        rewrite map lookup keys and default values are now expanded
  
  
  
  1.45      +1 -1      apache-2.0/src/lib/apr/include/apr_thread_proc.h
  
  Index: apr_thread_proc.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_thread_proc.h,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- apr_thread_proc.h	2000/09/28 14:59:33	1.44
  +++ apr_thread_proc.h	2000/10/18 06:09:08	1.45
  @@ -378,7 +378,7 @@
    * @param cont The pool to use. 
    */
   apr_status_t apr_create_process(apr_proc_t *new_proc, const char *progname, 
  -                              char *const args[], char **env, 
  +                              char *const *args, char **env, 
                                 apr_procattr_t *attr, apr_pool_t *cont);
   
   /**
  
  
  
  1.39      +3 -4      apache-2.0/src/lib/apr/threadproc/unix/proc.c
  
  Index: proc.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/unix/proc.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- proc.c	2000/09/15 21:07:34	1.38
  +++ proc.c	2000/10/18 06:09:09	1.39
  @@ -271,12 +271,11 @@
   }
   
   apr_status_t apr_create_process(apr_proc_t *new, const char *progname, 
  -                              char *const args[], char **env,
  +                              char *const *args, char **env,
                                 apr_procattr_t *attr, apr_pool_t *cont)
   {
       int i;
  -    typedef const char *my_stupid_string;
  -    my_stupid_string *newargs;
  +    const char **newargs;
   
       new->in = attr->parent_in;
       new->err = attr->parent_err;
  @@ -323,7 +322,7 @@
                   i++;
               }
               newargs =
  -               (my_stupid_string *) apr_palloc(cont, sizeof (char *) * (i + 3));
  +               (const char **) apr_palloc(cont, sizeof (char *) * (i + 3));
               newargs[0] = SHELL_PATH;
               newargs[1] = "-c";
               i = 0;
  
  
  
  1.71      +3 -3      apache-2.0/src/main/http_log.c
  
  Index: http_log.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_log.c,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- http_log.c	2000/10/16 06:04:52	1.70
  +++ http_log.c	2000/10/18 06:09:10	1.71
  @@ -198,7 +198,7 @@
           
           apr_tokenize_to_argv(progname, &args, p);
           pname = apr_pstrdup(p, args[0]);
  -        procnew = (apr_proc_t *) apr_palloc(p, sizeof(*procnew));
  +        procnew = (apr_proc_t *) apr_pcalloc(p, sizeof(*procnew));
           rc = apr_create_process(procnew, pname, args, NULL, procattr, p);
       
           if (rc == APR_SUCCESS) {
  @@ -561,7 +561,7 @@
   {
       int rc;
       apr_procattr_t *procattr;
  -    apr_proc_t *procnew;
  +    apr_proc_t *procnew = NULL;
       apr_status_t status;
   
   #ifdef SIGHUP
  @@ -583,7 +583,7 @@
   
           apr_tokenize_to_argv(pl->program, &args, pl->p);
           pname = apr_pstrdup(pl->p, args[0]);
  -        procnew = (apr_proc_t *) apr_palloc(pl->p, sizeof(*procnew));
  +        procnew = apr_pcalloc(pl->p, sizeof(apr_proc_t));
           rc = apr_create_process(procnew, pname, args, NULL, procattr, pl->p);
       
           if (rc == APR_SUCCESS) {