stderr vs. STDERR_FILENO
Mark Mitchell
mark@codesourcery.com
Wed Feb 25 01:57:00 GMT 2004
Andreas Schwab wrote:
>Mark Mitchell <mark@codesourcery.com> writes:
>
>
>
>>(2) stderr freopen'd (and not attached to fd 2)
>>
>>
>
>stderr freopen'd means it is still attached to fd 2.
>
>
Maybe on some implementations, but that's not required.
Typical implementations do a close, followed by an open.
In threaded code, some other thread might grab the fd between the close
and the open.
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com
More information about the Gcc-patches
mailing list