Re: Coalescing pipe allocation

From: Peter Edwards <peter.edwards_at_openet-telecom.com>
Date: Tue, 03 Feb 2004 16:30:54 +0000
Robert Watson wrote:

>On Sun, 1 Feb 2004, Dag-Erling Smørgrav wrote:
>
[snip]

>>I think our biggest problem with pipes is not half-open pipes but rather
>>their absence; most of the code that uses pipes only uses one direction
>>and does not bother to shut the other down.
>>
[snip]
How would one "shut down" one direction of the pipe and still maintain 
the other? I don't know how I can signal my intention not to read or 
write to the end I leave open...

>Yeah, I was interested by this observation -- many applications don't even
>think pipes are bi-directional, meaning that doing work allocating pipe
>map space for both directions basically wastes half the work. 
>
The applications that do this are only doing what's recommended of them. 
>From the pipe(2) manpage:

>      The bidirectional nature of this implementation of pipes is not 
> portable
>      to older systems, so it is recommended to use the convention for 
> using
>      the endpoints in the traditional manner when using a pipe in one 
> direc-
>      tion.

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.
Received on Tue Feb 03 2004 - 07:30:59 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:41 UTC