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] popen should ignore 'b' in mode


------- Additional Comments From xiyou dot wangcong at gmail dot com  2010-02-23 09:45 -------
(In reply to comment #0)
> 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'.

It seems that ignoring 'b' makes sense.

Patch below does this.


-- 


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]