Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Feb 2004 21:53:30 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Robert Watson <rwatson@freebsd.org>
Cc:        current@freebsd.org
Subject:   Re: Coalescing pipe allocation
Message-ID:  <20040204214426.U1469@gamplex.bde.org>
In-Reply-To: <Pine.NEB.3.96L.1040203115210.79056E-100000@fledge.watson.org>
References:  <Pine.NEB.3.96L.1040203115210.79056E-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 3 Feb 2004, Robert Watson wrote:

> On Tue, 3 Feb 2004, Peter Edwards wrote:
>
> > I have certainly taken that at face value at least once when deciding on
> > how to use (or not use) pipes.  Is this portability issue so
> > ridiculously out of date that the comment in the pipe(2) manpage should
> > be removed, or at least toned down? It seems silly to incur the costs of
> > implementation you've mentioned and then recommend that the feature not
> > be used.

> Well, I don't know so much about the portability issues, but I can say
> that it seems silly to incur the costs if few applications take advantage
> of the feature.  Especially if the cost can be defered until the feature

Pipes were originally made bidirectional partly because this feature was
"free":

% RCS file: /home/ncvs/src/sys/kern/uipc_syscalls.c,v
% Working file: uipc_syscalls.c
% head: 1.171
% ...
% ----------------------------
% revision 1.11
% date: 1996/01/01 10:28:21;  author: peter;  state: Exp;  lines: +3 -3
% Make pipe() return a set of bidirectional pipe fd's rather than one-way only
% just like on SVR4.
%
% This has no effect on any current programs in our source, but makes
% the use of SVR4 code a little easier.  There is no code or implementation
% cost in the kernel.. This two-line change merely sets the modes on the ends
% of the pipes to be bidirectional.  There are no other changes.
% ----------------------------

This was before optimization made the implementation of pipes complicated.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040204214426.U1469>