httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <>
Subject Re: mod_asis; apr_bucket_file_create->destroy->poolcleanup->fileclose
Date Fri, 12 Oct 2001 23:14:57 GMT
On Fri, 12 Oct 2001, Ryan Bloom wrote:

> The model is REALLY simple.  apr_file_t's are created by
> apr_file_open, at that time, a cleanup is registered on the pool that
> was passed into the file_open function.  apr_bucket_file_create just
> creates a bucket and puts the file into it.  When the bucket is
> destroyed, the bucket is freed()


> and we check the refcount to
> determine if we should call apr_file_close.

No.  file_destroy() does not call apr_file_close(), ever.

static void file_destroy(void *data)
    if (apr_bucket_shared_destroy(data)) {
        /* no need to close the file here; it will get
         * done automatically when the pool gets cleaned up */


   Cliff Woolley
   Charlottesville, VA

View raw message