apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Clark <mich...@metaparadigm.com>
Subject Re: apr_os_dir_put fixes
Date Thu, 13 Dec 2007 12:14:06 GMT
Iain Wade wrote:
> New summary:
> dir.patch:
> 1/ add apr_dir_put_ex, adding dirname and flags
> 2/ refactor apr_dir_open to use apr_dir_put_ex
> 3/ add apr_dir_name_get
> 4/ add apr_dir_pool_get
> file.patch:
> 1/ add apr_os_file_put_ex, changing behavior to honour
> 2/ refactor apr_file_open to use apr_dir_put_ex

OK. So the _ex variants register a cleanup unless you pass 
APR_(FILE|DIR)_NOCLEANUP flag - so both behaviours are possible.

I have tested the privsep patches with changes to use these new APIs and 
they work as expected.

There is no longer a need to delve into the internals of the apr_dir_t 
struct to get a working apr_dir_t from a apr_os_dir_t or to access non 
public APIs to get files cleaned up when apr_file_close is called on an 
apr_file_t created with apr_os_file_put_ex.

I've also tested these patches with a standard httpd-trunk exercising 
the normal path apr_dir_open/apr_file_open.

View raw message