This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/11312] New: popen should ignore 'b' in mode
- From: "ebb9 at byu dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 22 Feb 2010 23:27:20 -0000
- Subject: [Bug libc/11312] New: popen should ignore 'b' in mode
- Reply-to: sourceware-bugzilla at sourceware dot org
For consistency with fopen and freopen, it would be nice if popen(cmd,"rb")
behaved like popen(cmd,"r") rather than failing with EINVAL. In particular, the
extension of supporting 'b' in the mode argument is already provided by Cygwin
(although in cygwin, it actually makes a difference between text and binary
pipes). POSIX does not forbid this extension.
The request to allow applications to blindly request binary mode, even though it
is otherwise a no-op in glibc, was first made here:
http://lists.gnu.org/archive/html/bug-gnulib/2010-02/msg00195.html
Likewise, it would be nice if other fopen extension flags were gracefully
handled (silently ignore 'm', 'x', and honor 'c'), since 'e' is already a common
extension between both fopen and popen. There is already precedence for this,
since fdopen silently ignores 'x'.
--
Summary: popen should ignore 'b' in mode
Product: glibc
Version: 2.12
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: ebb9 at byu dot net
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=11312
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.