You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2001/10/16 14:21:53 UTC

cvs commit: apr/file_io/win32 pipe.c

trawick     01/10/16 05:21:53

  Modified:    .        CHANGES
               file_io/win32 pipe.c
  Log:
  The pipe creation code used by mod_cgi in Apache 2.0
  doesn't register cleanups for either the read or the
  write ends of the pipe - so file handles (and event handles
  for pipes with asynchronous I/O mode set) are never closed.
  The function in question is called apr_create_nt_pipe, and
  the following patch fixes this (see also apr_file_pipe_create).
  
  Submitted by:	Tim Costello <ti...@zcmgroup.com.au>
  Reviewed by:	Jeff Trawick
  
  Revision  Changes    Path
  1.171     +6 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.170
  retrieving revision 1.171
  diff -u -r1.170 -r1.171
  --- CHANGES	2001/10/16 12:07:57	1.170
  +++ CHANGES	2001/10/16 12:21:52	1.171
  @@ -1,5 +1,11 @@
   Changes with APR b1  
   
  +  *) Fix a problem in the Win32 pipe creation code called by 
  +     apr_proc_create():  It didn't register cleanups for either the 
  +     read or the write ends of the pipe, so file handles (and event 
  +     handles for pipes with asynchronous I/O mode set) are never 
  +     closed.  [Tim Costello <ti...@zcmgroup.com.au>]
  +
     *) Add support for QNX 6.  [J.T. Conklin <jt...@acorntoolworks.com>]
   
     *) We now create exports.c and export_vars.h, which in turn create
  
  
  
  1.39      +4 -0      apr/file_io/win32/pipe.c
  
  Index: pipe.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/win32/pipe.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- pipe.c	2001/07/23 17:47:27	1.38
  +++ pipe.c	2001/10/16 12:21:53	1.39
  @@ -230,5 +230,9 @@
           }
       }
   
  +    apr_pool_cleanup_register((*in)->cntxt, (void *)(*in), file_cleanup,
  +                        apr_pool_cleanup_null);
  +    apr_pool_cleanup_register((*out)->cntxt, (void *)(*out), file_cleanup,
  +                        apr_pool_cleanup_null);
       return APR_SUCCESS;
   }