All of lore.kernel.org
 help / color / mirror / Atom feed
From: jw schultz <jw@pegasys.ws>
To: linux-kernel@vger.kernel.org
Subject: Re: kernel bug in socketpair()
Date: Wed, 23 Jul 2003 15:24:32 -0700	[thread overview]
Message-ID: <20030723222432.GC16188@pegasys.ws> (raw)
In-Reply-To: <200307231929.PAA77754@raptor.research.att.com>

On Wed, Jul 23, 2003 at 03:29:03PM -0400, Glenn Fowler wrote:
> 
> On Wed, 23 Jul 2003 12:14:36 -0700 David S. Miller wrote:
> > I missed the reason why you can't use pipes and bash
> > is able to, what is it?
> 
> we have some applications, ksh included, with semantics that require
> stdin be read at most one line at a time; an inefficient implementation
> of this does 1 byte read()s until newline is read; an efficient
> implementation does a peek read (without advancing the read/seek offset),
> determines how many chars to read up to and including the newline,
> and then read()s that much
> 
> linux has ioctl(I_PEEK) for stream devices and recv() for sockets,
> and neither of these work on pipes; if there is a linux alternative
> for pipes then we'd be glad to use it
> 
> we switched from pipe() to socketpair() to take advantage of the linux
> recv() peek read

Perhaps you'd rather code a patch adding peek functionality
for pipes.

-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw@pegasys.ws

		Remember Cernan and Schmitt

  parent reply	other threads:[~2003-07-23 22:10 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-23 14:28 Re: kernel bug in socketpair() David Korn
2003-07-23 14:46 ` David S. Miller
2003-07-23 16:56   ` Glenn Fowler
2003-07-23 17:00     ` David S. Miller
2003-07-23 17:24       ` Glenn Fowler
2003-07-23 17:31         ` David S. Miller
2003-07-23 18:14           ` Glenn Fowler
2003-07-23 18:23             ` David S. Miller
2003-07-23 18:54               ` Glenn Fowler
2003-07-23 19:04                 ` David S. Miller
2003-07-23 19:11                   ` Glenn Fowler
2003-07-23 19:14                     ` David S. Miller
2003-07-23 19:29                       ` Glenn Fowler
2003-07-23 19:56                         ` David S. Miller
2003-07-23 22:24                         ` jw schultz [this message]
2003-07-23 19:08                 ` Alan Cox
2003-07-23 19:41       ` Andreas Jellinghaus
2003-07-23 17:50     ` Alan Cox
2003-07-23 23:27       ` Bill Rugolsky Jr.
  -- strict thread matches above, loose matches on Subject: below --
2003-07-23 13:32 David Korn
2003-07-23 14:04 ` David S. Miller
2003-07-23 14:20 ` Alan Cox
2003-07-23 15:36   ` David S. Miller
2003-07-23 16:13     ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030723222432.GC16188@pegasys.ws \
    --to=jw@pegasys.ws \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.