[Bug stdio/15589] freopen would close oldfd even though oldfd is same as newfd
fweimer at redhat dot com
sourceware-bugzilla@sourceware.org
Sat Nov 26 10:29:00 GMT 2016
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.
More information about the Glibc-bugs
mailing list