diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2001-10-16 12:21:53 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2001-10-16 12:21:53 +0000 |
commit | 2943ca30e8eb7833af09024ac3a9e8144bd7102c (patch) | |
tree | a20ca2375b6a7ec6fd58f36875ebbe12a11092c4 /file_io/win32 | |
parent | aa469cf1befa31676f5ddd794db05195149a93cc (diff) | |
download | libapr-2943ca30e8eb7833af09024ac3a9e8144bd7102c.tar.gz |
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 <tim.costello@zcmgroup.com.au>
Reviewed by: Jeff Trawick
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62429 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/win32')
-rw-r--r-- | file_io/win32/pipe.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/file_io/win32/pipe.c b/file_io/win32/pipe.c index a26b107ea..0faa5d632 100644 --- a/file_io/win32/pipe.c +++ b/file_io/win32/pipe.c @@ -230,5 +230,9 @@ apr_status_t apr_create_nt_pipe(apr_file_t **in, apr_file_t **out, } } + 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; } |