bug-coreutils
[Top][All Lists]
Advanced

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

bug#9089: [1003.1(2008)/Issue 7 0000205]: Shell pipeline connection requ


From: Glenn Fowler
Subject: bug#9089: [1003.1(2008)/Issue 7 0000205]: Shell pipeline connection requirement too vague
Date: Mon, 18 Jul 2011 15:08:25 -0400

we need a standard way to peek read data on a pipe without blocking or 
consuming the data

we use ioctl(I_PEEK) on pipe() on systems that feature test ok for that
and if not then recv(MSG_PEEK) on socketpair()
otherwise the much slower "cant't peek pipe data" code kicks in

rather than getting stuck on using a socket api for pipes
can we first determine that peeking pipe read data is useful
and then determine an api

On Fri, 15 Jul 2011 14:47:19 -0400 Garrett Wollman wrote:
> <<On Fri, 15 Jul 2011 13:38:44 -0500, Jonathan Nieder <address@hidden> said:

> > Does any Unix-like platform aside from Linux lack that feature?  Is
> > there any architectural consideration that would make MSG_PEEK
> > difficult to implement for Linux's pipes?  (For the former, I have no
> > clue, while for the latter, I suspect not.)

> On FreeBSD it will error out with [ENOTSOCK].

> I would in general caution against going down this particular
> direction.  Some systems implemented pipes on top of sockets, but this
> is an implementation detail and applications which rely on that
> behavior are in error.

> -GAWollman






reply via email to

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