apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: apr_file_open() and caching file descriptors
Date Mon, 04 Mar 2002 23:29:01 GMT
On Mon, 4 Mar 2002, Bill Stoddard wrote:

> > apr_file_open(yadda,..., APR_XTHREAD|APR_DO_NOT_REGISTER_CLEANUP, r->pool);

I don't conceptually have a problem with the APR_NO_CLEANUP flag (or
whatever it would be called), but I do have a problem with using
apr_os_file_get/apr_os_file_put for this.  There has got to be a better
way.  (For one thing, your APR_XTHREAD flag is meaningless if you do
that.)

> Rather than an option to not register a cleanup, perhaps a function to
> kill the cleanup would be more generally useful.
>
> apr_file_kill_cleanups(apr_file_t *file);

You still have a problem with the apr_file_t disappearing when r->pool
goes away, meaning you'd still need the apr_os_file_get/put thing, which
just doesn't seem like a good idea to me.  There has got to be a good way
to do this... I'll keep thinking on it and get back to you asap.

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Mime
View raw message