httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/file_io/win32 pipe.c
Date Wed, 18 Oct 2000 17:00:00 GMT
trawick     00/10/18 09:59:58

  Modified:    src      CHANGES
               src/lib/apr/file_io/unix pipe.c
               src/lib/apr/file_io/win32 pipe.c
  Log:
  APR pipes on Unix and Win32 are now cleaned up automatically when the
  associated pool goes away.  (APR pipes on OS/2 were already had this
  logic.)  This resolvs a fatal file descriptor leak with CGIs.
  
  (I'm also thinking at closing a pipe sooner in pipe_read() once we've
  reached the end of the pipe.  Speak up if you think that is stupid.
  socket_read() has the same issue.)
  
  Revision  Changes    Path
  1.284     +5 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.283
  retrieving revision 1.284
  diff -u -r1.283 -r1.284
  --- CHANGES	2000/10/18 15:58:26	1.283
  +++ CHANGES	2000/10/18 16:59:49	1.284
  @@ -1,4 +1,9 @@
   Changes with Apache 2.0a8
  +  *) APR pipes on Unix and Win32 are now cleaned up automatically when the 
  +     associated pool goes away.  (APR pipes on OS/2 were already had this
  +     logic.)  This resolvs a fatal file descriptor leak with CGIs.  
  +     [Jeff Trawick]
  +
     *) The final line of the config file was not being read if there was
        no \n at the end of it.  This was caused by apr_fgets returning 
        APR_EOF even though we had read valid data.  This is solved by
  
  
  
  1.39      +4 -0      apache-2.0/src/lib/apr/file_io/unix/pipe.c
  
  Index: pipe.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/pipe.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- pipe.c	2000/08/02 05:25:51	1.38
  +++ pipe.c	2000/10/18 16:59:52	1.39
  @@ -178,6 +178,10 @@
       (*in)->thlock = NULL;
   #endif
   
  +    apr_register_cleanup((*in)->cntxt, (void *)(*in), apr_unix_file_cleanup,
  +                         apr_null_cleanup);
  +    apr_register_cleanup((*out)->cntxt, (void *)(*out), apr_unix_file_cleanup,
  +                         apr_null_cleanup);
       return APR_SUCCESS;
   }
   
  
  
  
  1.29      +4 -0      apache-2.0/src/lib/apr/file_io/win32/pipe.c
  
  Index: pipe.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/pipe.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- pipe.c	2000/10/06 17:24:38	1.28
  +++ pipe.c	2000/10/18 16:59:57	1.29
  @@ -105,6 +105,10 @@
           return apr_get_os_error();
       }
   
  +    apr_register_cleanup((*in)->cntxt, (void *)(*in), file_cleanup,
  +                        apr_null_cleanup);
  +    apr_register_cleanup((*out)->cntxt, (void *)(*out), file_cleanup,
  +                        apr_null_cleanup);
       return APR_SUCCESS;
   }
   
  
  
  

Mime
View raw message