This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug stdio/21398] freopen does not check dup3 return value, and does not return error if dup3 fails (seen when open returns fd 0, and freopen on stdin)
- From: "schwab at linux-m68k dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 19 Apr 2017 10:32:02 +0000
- Subject: [Bug stdio/21398] freopen does not check dup3 return value, and does not return error if dup3 fails (seen when open returns fd 0, and freopen on stdin)
- Auto-submitted: auto-generated
- References: <bug-21398-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21398
--- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> ---
In the (non-normative) application usage of close POSIX says: "Usage of close()
on file descriptors STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO should
immediately be followed by an operation to reopen these file descriptors."
--
You are receiving this mail because:
You are on the CC list for the bug.