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 libc/11312] New: popen should ignore 'b' in mode


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.


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