This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/4559] New: freopen failed if asked to open /dev/stdin
- From: "addw at phcomp dot co dot uk" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 29 May 2007 17:53:45 -0000
- Subject: [Bug libc/4559] New: freopen failed if asked to open /dev/stdin
- Reply-to: sourceware-bugzilla at sourceware dot org
Because fdopen() closes the file handle first the code:
freopen("/dev/stdin", "r", stdin)
fails -- /dev/stdin can't be opened.
If it opened a new file descriptor first and then closed this would work.
The real need is simple minded programs that naively use freopen() and then use
stdin or stdout.
--
Summary: freopen failed if asked to open /dev/stdin
Product: glibc
Version: 2.4
Status: NEW
Severity: minor
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: addw at phcomp dot co dot uk
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=4559
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.