This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug stdio/15589] freopen would close oldfd even though oldfd is same as newfd
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 26 Nov 2016 10:29:28 +0000
- Subject: [Bug stdio/15589] freopen would close oldfd even though oldfd is same as newfd
- Auto-submitted: auto-generated
- References: <bug-15589-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=15589
--- Comment #8 from Florian Weimer <fweimer at redhat dot com> ---
I'm struggling to come up with an interpretation of POSIX which allows one to
close the underlying file descriptor of a stream. Our implementation does not
support this for several reasons (flushing on exit is one).
POSIX requires ignoring errors on freopen, which is not quite the same thing.
It also makes it impossible to check for data loss when reopening a writable
stream, so I don't see why anyone would want to use this interface.
--
You are receiving this mail because:
You are on the CC list for the bug.