On Sun, Feb 04, 2001 at 01:54:52PM -0800, [EMAIL PROTECTED] wrote:
> 
> >   +    * I think apr_open_stderr() and friends dup() the descriptor. That
> >   +      would allow the new/returned file to be closed (via pool cleanup
> >   +      or manually) without accidentally closing stderr/out.
> 
> The goal of those functions is to actually get stderr, stdout, stdin into
> an apr_file_t.  The only reason they exist, is because Windows requires an
> extra function to get stderr, stdout, stdin when we use native file
> types.  If you want to dup them, then that should be done by you
> explicitly.  There is no reason to cause that extra call for programs that
> know they don't want to do the dup.

Subversion makes ample use of subpools. If the apr_file_t for stderr was
placed into a subpool, then the thing would get closed when a pool cleanup
occurred.

And I can't dup the file after it has been placed into an apr_file_t. The
first will continue to exist, and would get closed on cleanup.

Creating an apr_file_t for stderr/out/in is fine, but that cleanup is a
problem, and the dup is the only solution that I've figured out so far.
Other ideas are welcome; it certainly won't be "soon" that I get into that
code to do the dup... we have time.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Reply via email to