From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4071 invoked from network); 9 Jun 2006 03:29:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 9 Jun 2006 03:29:14 -0000 Received: (qmail 74959 invoked from network); 9 Jun 2006 03:29:04 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Jun 2006 03:29:04 -0000 Received: (qmail 21639 invoked by alias); 9 Jun 2006 03:28:56 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10363 Received: (qmail 21630 invoked from network); 9 Jun 2006 03:28:56 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 9 Jun 2006 03:28:56 -0000 Received: (qmail 73852 invoked from network); 9 Jun 2006 03:28:56 -0000 Received: from vms046pub.verizon.net (206.46.252.46) by a.mx.sunsite.dk with SMTP; 9 Jun 2006 03:28:55 -0000 Received: from torch.brasslantern.com ([71.116.105.50]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0J0K00H5XPNX77A4@vms046.mailsrvcs.net> for zsh-users@sunsite.dk; Thu, 08 Jun 2006 22:28:46 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k593SiNI010412; Thu, 08 Jun 2006 20:28:44 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k593SiE4010411; Thu, 08 Jun 2006 20:28:44 -0700 Date: Thu, 08 Jun 2006 20:28:44 -0700 From: Bart Schaefer Subject: Re: Bi-directional pipe In-reply-to: <4486CBA2.9030501@yahoo.fr> To: Guillaume Chazarain , zsh-users@sunsite.dk Message-id: <060608202844.ZM10410@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <4486CBA2.9030501@yahoo.fr> Comments: In reply to Guillaume Chazarain "Bi-directional pipe" (Jun 7, 2:50pm) On Jun 7, 2:50pm, Guillaume Chazarain wrote: } } Is there a way to make a bi-directional pipe in zsh? Peter has already given an answer to this, but I just have to add that having two processes connected in a loop this way is a sure road to deadlock unless both processes are fully prepared for it (which means for example that they're polling their input and output with select() or poll() and using non-blocking reads and writes). It might *seem* to work in simple tests, but that's just because the operating system and/or the I/O library are doing buffering of the input and output streams. As soon as one of the processes produces more output than will fit in the buffer, you're in deep trouble.