This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/682] stdout and file descriptor mismatch after a freopen()
- From: "vincent+libc at vinc17 dot org" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 15 Feb 2005 00:10:48 -0000
- Subject: [Bug libc/682] stdout and file descriptor mismatch after a freopen()
- References: <20050119161710.682.vincent+libc@vinc17.org>
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
------- Additional Comments From vincent+libc at vinc17 dot org 2005-02-15 00:10 -------
However the current behavior violates the ISO C standard (or the system
documentation is incorrect).
But the solution to reserve the fd 0, 1 and 2 for stdin, stdout and stderr in
ISO C programs (as long as a race condition doesn't occur) would be OK. Note
that a C implementation isn't required to have fully reentrant standard
functions, so that if the programmer wants stdin, stdout and stderr to really
correspond to the standard streams, then he should also make sure that no race
condition occurs.
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=682
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.