apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: file_setaside()
Date Tue, 26 Jun 2001 15:29:32 GMT
On Tue, 26 Jun 2001, Justin Erenkrantz wrote:

> Why?  Don't we need to create a duplicate file handle?  What am I
> missing?  -- justin

Not for file_setaside() we don't.  All file_setaside() cares about is that
the apr_file_t and its associated locks and stuff get put into the
appropriate pool.  The apr_os_file_t file handle that is referred to by
the apr_file_t knows nothing about pools (it's just an int or HANDLE or
HFILE or whatever).  So we can keep the same apr_os_file_t and just wrap a
new apr_file_t around it.  No call to the OS's dup() is needed.  Make
sense?

--Cliff

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



Mime
View raw message