On Fri, 16 Oct 2009 15:39:49 +0700, Joe Orton <[email protected]> wrote:

On Fri, Oct 16, 2009 at 03:26:31PM +0700, Yuri V. Vishnevskiy wrote:
Dear developers,
For some reason in my program I need two file handlers of stdout stream.
When I close these handlers I obtain an error on the second close: "Bad
file descriptor"

It seems like reasonable behaviour that the second apr_file_close() call
should fail, though it certainly isn't obvious from reading the docs.
How else do you expect it to behave?  You cannot close an fd twice.

I understand that very clearly. What I do not understand well is the APR file API policy, since apr_file_ functions are general for both usual files and std*.

Reply via email to