This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug stdio/15589] freopen would close oldfd even though oldfd is same as newfd


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]