From owner-freebsd-current@FreeBSD.ORG Tue Feb 3 08:30:59 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A045016A4CF; Tue, 3 Feb 2004 08:30:59 -0800 (PST) Received: from sweeper.openet-telecom.com (mail.openet-telecom.com [62.17.151.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id B34DF43D1F; Tue, 3 Feb 2004 08:30:56 -0800 (PST) (envelope-from peter.edwards@openet-telecom.com) Received: from mail.openet-telecom.com (unverified) by sweeper.openet-telecom.com ; Tue, 3 Feb 2004 16:32:26 +0000 Received: from openet-telecom.com (10.0.3.126) by mail.openet-telecom.com (NPlex 6.5.027) (authenticated as Peter@openet-telecom.com) id 401F702800000CAB; Tue, 3 Feb 2004 16:32:23 +0000 Message-ID: <401FCCBE.2010008@openet-telecom.com> Date: Tue, 03 Feb 2004 16:30:54 +0000 From: Peter Edwards User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040120 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robert Watson References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit cc: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= cc: current@FreeBSD.org Subject: Re: Coalescing pipe allocation X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2004 16:30:59 -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.