Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jul 2003 18:48:13 +0300
From:      Diomidis Spinellis <dds@aueb.gr>
To:        Kirk Strauser <kirk@strauser.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Network pipes
Message-ID:  <3F21513D.52897D08@aueb.gr>
References:  <3F1F96A5.A7D2D221@aueb.gr> <873cgvh9oe.fsf@pooh.honeypot.net> <3F20C8C9.C760FC9A@aueb.gr> <87y8ymepmq.fsf@pooh.honeypot.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Kirk Strauser wrote:
> At 2003-07-25T06:06:01Z, Diomidis Spinellis <dds@aueb.gr> writes:
> > You still have the overhead of two nc instances copying data and context
> > switching.
> Forgive my ignorance, but is that significantly higher than two /bin/sh
> instances copying data and context switching?

When the shell connects two local processes with a pipe it just
redirects the output of the one and the input of the other to the two
ends of a pipe(2) IPC abstraction and leaves them to communicate with
each other simply wait(2)ing until they finish.  The shell does not
shuffle the data between the two processes.  The same can also be done
when connecting a local process with a remote process through a
socket(2); there is no need for an intermediary, and this is what I have
implemented.

Diomidis - http://www.spinellis.gr



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F21513D.52897D08>