9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Enrico Weigelt <weigelt@metux.de>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] Pipes on UNIX
Date: Thu,  6 Sep 2007 16:04:15 +0200	[thread overview]
Message-ID: <20070906140414.GA26188@nibiru.local> (raw)
In-Reply-To: <45219fb00709060604s2d6fc50ex270cfcf30c36067a@mail.gmail.com>

* Lluís Batlle <viriketo@gmail.com> wrote:

Hi,

although, it's quite OT ...

> I understand from [1] that named pipes are suposed to use the
> filesystem as an "unlimited" buffer for the pipe. 

Actually, not. (at least on Unix)

Pipes are FIFOs with an limited buffer size (ie on linux-2.4 of one 
page=4k, on linux-2.6 IMHO 64k). And pipes are always meant for an 
sequential and continous data flow between reader and writer. Yes, 
there are some deadlock flaws (experienced them by myself ie. w/ 
sun-jdk), but they don't come from a limited buffer, but unclean 
handling of tricky situations (ie too large or asymetric chunks on 
reader vs. writer). You probably can work around them by reading
byte per byte (ugly!).

Maybe you would like to have a look at Unix Domain Sockets.
They support bi-directional transfers, fd passing (at least @ Linux)
and packet transfer. You can control many things using setsockopt(1).

> Or maybe the named pipes were never supposed to use the disk as
> the pipe buffer?

Exactly.

For those things you could simply write an little 9p server ;-)
 

cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------


      parent reply	other threads:[~2007-09-06 14:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-06 13:04 Lluís Batlle
2007-09-06 13:57 ` sqweek
2007-09-06 14:02   ` Lluís Batlle
2007-09-06 14:12     ` sqweek
2007-09-06 14:42       ` Lluís Batlle
2007-09-06 14:47         ` Gorka Guardiola
2007-09-06 14:57           ` Lluís Batlle
2007-09-06 15:52           ` ron minnich
2007-09-06 16:06             ` Gorka Guardiola
2007-09-06 20:17               ` Lluís Batlle
2007-09-06 20:33                 ` erik quanstrom
2007-09-06 20:40                   ` Lluís Batlle
2007-09-06 21:51                 ` Charles Forsyth
2007-09-06 14:04 ` Enrico Weigelt [this message]

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=20070906140414.GA26188@nibiru.local \
    --to=weigelt@metux.de \
    --cc=9fans@cse.psu.edu \
    /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 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 NNTP newsgroup(s).