public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/11312] New: popen should ignore 'b' in mode
@ 2010-02-22 23:27 ebb9 at byu dot net
  2010-02-23  9:45 ` [Bug libc/11312] " xiyou dot wangcong at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: ebb9 at byu dot net @ 2010-02-22 23:27 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/11312] popen should ignore 'b' in mode
  2010-02-22 23:27 [Bug libc/11312] New: popen should ignore 'b' in mode ebb9 at byu dot net
@ 2010-02-23  9:45 ` xiyou dot wangcong at gmail dot com
  2010-02-23  9:46 ` xiyou dot wangcong at gmail dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: xiyou dot wangcong at gmail dot com @ 2010-02-23  9:45 UTC (permalink / raw)
  To: glibc-bugs


------- 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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/11312] popen should ignore 'b' in mode
  2010-02-22 23:27 [Bug libc/11312] New: popen should ignore 'b' in mode ebb9 at byu dot net
  2010-02-23  9:45 ` [Bug libc/11312] " xiyou dot wangcong at gmail dot com
@ 2010-02-23  9:46 ` xiyou dot wangcong at gmail dot com
  2010-02-24  0:16 ` bkorb at gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: xiyou dot wangcong at gmail dot com @ 2010-02-23  9:46 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From xiyou dot wangcong at gmail dot com  2010-02-23 09:46 -------
Created an attachment (id=4620)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4620&action=view)
proposed patch


-- 


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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/11312] popen should ignore 'b' in mode
  2010-02-22 23:27 [Bug libc/11312] New: popen should ignore 'b' in mode ebb9 at byu dot net
  2010-02-23  9:45 ` [Bug libc/11312] " xiyou dot wangcong at gmail dot com
  2010-02-23  9:46 ` xiyou dot wangcong at gmail dot com
@ 2010-02-24  0:16 ` bkorb at gnu dot org
  2010-04-05 18:39 ` drepper at redhat dot com
  2010-04-05 21:06 ` bkorb at gnu dot org
  4 siblings, 0 replies; 8+ messages in thread
From: bkorb at gnu dot org @ 2010-02-24  0:16 UTC (permalink / raw)
  To: glibc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bkorb at gnu dot org


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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/11312] popen should ignore 'b' in mode
  2010-02-22 23:27 [Bug libc/11312] New: popen should ignore 'b' in mode ebb9 at byu dot net
                   ` (2 preceding siblings ...)
  2010-02-24  0:16 ` bkorb at gnu dot org
@ 2010-04-05 18:39 ` drepper at redhat dot com
  2010-04-05 21:06 ` bkorb at gnu dot org
  4 siblings, 0 replies; 8+ messages in thread
From: drepper at redhat dot com @ 2010-04-05 18:39 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2010-04-05 18:38 -------
Unnecessarily slowing down and enlarging well designed software for the purpose
of criplled OS and the lazy developers targeting them isn't acceptable.  For
decades people handled this correctly by passing different parameters on
different platforms.  Why can't you?

And don't argue "but it's not much".  This is how it always starts.  The next
time the argument (similar to what is done here already) is "since that change
went in you can also change this".

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/11312] popen should ignore 'b' in mode
  2010-02-22 23:27 [Bug libc/11312] New: popen should ignore 'b' in mode ebb9 at byu dot net
                   ` (3 preceding siblings ...)
  2010-04-05 18:39 ` drepper at redhat dot com
@ 2010-04-05 21:06 ` bkorb at gnu dot org
  4 siblings, 0 replies; 8+ messages in thread
From: bkorb at gnu dot org @ 2010-04-05 21:06 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From bkorb at gnu dot org  2010-04-05 21:05 -------
The "lazy programmers targeting them" is an unnecessary pajorative.
Sometimes, Ulrich, folks write software that other folks want to
port to "the crippled OS", that's why _I_ can't.  It's my software
and someone else is doing the porting.  And that is why the 'b'
character was added to the fopen() functions.

-- 


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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/11312] popen should ignore 'b' in mode
       [not found] <bug-11312-131@http.sourceware.org/bugzilla/>
  2014-06-30 18:45 ` fweimer at redhat dot com
@ 2014-06-30 19:20 ` eblake at redhat dot com
  1 sibling, 0 replies; 8+ messages in thread
From: eblake at redhat dot com @ 2014-06-30 19:20 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=11312

Eric Blake <eblake at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eblake at redhat dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/11312] popen should ignore 'b' in mode
       [not found] <bug-11312-131@http.sourceware.org/bugzilla/>
@ 2014-06-30 18:45 ` fweimer at redhat dot com
  2014-06-30 19:20 ` eblake at redhat dot com
  1 sibling, 0 replies; 8+ messages in thread
From: fweimer at redhat dot com @ 2014-06-30 18:45 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=11312

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-06-30 19:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-22 23:27 [Bug libc/11312] New: popen should ignore 'b' in mode ebb9 at byu dot net
2010-02-23  9:45 ` [Bug libc/11312] " xiyou dot wangcong at gmail dot com
2010-02-23  9:46 ` xiyou dot wangcong at gmail dot com
2010-02-24  0:16 ` bkorb at gnu dot org
2010-04-05 18:39 ` drepper at redhat dot com
2010-04-05 21:06 ` bkorb at gnu dot org
     [not found] <bug-11312-131@http.sourceware.org/bugzilla/>
2014-06-30 18:45 ` fweimer at redhat dot com
2014-06-30 19:20 ` eblake at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).