On Mon, Oct 01, 2001 at 01:36:18PM -0500, William A. Rowe, Jr. wrote: > From: "Cliff Woolley" <[EMAIL PROTECTED]> > Sent: Monday, October 01, 2001 1:32 PM > > > > I think it should just say this: > > > > { > > apr_pool_cleanup_kill(file->cntxt, file, apr_unix_file_cleanup); > > return apr_unix_file_cleanup(file); > > } > > > > Which is exactly equivalent to what apr_dir_close() does now that it's > > been fixed. Thoughts? > > Thinking ... yes. > > Clear, concise, and less redundant.
Umm... no. Use apr_pool_cleanup_run(). That will run *and* remove the cleanup in one fell swoop. So your code is even simpler: return apr_pool_cleanup_run(file->cntxt, file, apr_unix_file_cleanup); You could even see this as an "atomic" run-remove call. Cheers, -g -- Greg Stein, http://www.lyra.org/