bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9089: pipe failure with cat and head of coreutils 6.12


From: Philipp Thomas
Subject: bug#9089: pipe failure with cat and head of coreutils 6.12
Date: Fri, 15 Jul 2011 17:14:28 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

* Eric Blake (address@hidden) [20110715 15:03]:

> And that behavior of ksh is probably a violation of POSIX:
> http://austingroupbugs.net/view.php?id=205

that discussion is from 2006 and ksh has had that feature for quite a bit
longer. The reasin is that sockpairs are faster than pipes and and much
faster when piping large amounts of data.

And how about this comment from geoffclare on 2010-01-06 15:04:

<cite>
  I tried the latest ksh93 binary (93t+) and found that it uses a socket
  pair on Linux, but a pipe on OpenSolaris. (I originally tried 93s+ on
  Linux, then downloaded the latest to make sure it wasn't a difference
  between 93s+ and 93t+.) I assume there must be a good reason for it
  choosing to use a socket pair on some systems instead of a pipe, so I
  agree the wording should allow this behaviour.

  I suggest:

      "For each command but the last, the shell shall connect the
      standard output of the command to the standard input of the
      next command by creating either a pipe or a unidirectional
      socket pair (an unbound pair of connected sockets of type
      SOCK_STREAM with one of the pair shut down for sending and
      the other shut down for receiving - see [xref to socketpair()]
      and [xref to shutdown()]) and passing the writable end of
      the pipe or socket pair as the standard output of the command
      and the readable end of the pipe or socket pair as the standard
      input of the next command."
</cite>

Philipp





reply via email to

[Prev in Thread] Current Thread [Next in Thread]