From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28250 invoked from network); 11 Jan 2005 09:07:45 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 Jan 2005 09:07:45 -0000 Received: (qmail 87515 invoked from network); 11 Jan 2005 09:07:39 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Jan 2005 09:07:39 -0000 Received: (qmail 8047 invoked by alias); 11 Jan 2005 09:07:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20671 Received: (qmail 8026 invoked from network); 11 Jan 2005 09:07:33 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 Jan 2005 09:07:33 -0000 Received: (qmail 85008 invoked from network); 11 Jan 2005 09:06:34 -0000 Received: from smtp-out5.blueyonder.co.uk (195.188.213.8) by a.mx.sunsite.dk with SMTP; 11 Jan 2005 09:06:30 -0000 Received: from sc ([82.41.210.43]) by smtp-out5.blueyonder.co.uk with Microsoft SMTPSVC(5.0.2195.6713); Tue, 11 Jan 2005 09:07:02 +0000 Date: Tue, 11 Jan 2005 09:07:49 +0000 From: Stephane Chazelas To: Zsh hackers list Subject: Re: multios and unnecessary processes Message-ID: <20050111090749.GA4467@sc> Mail-Followup-To: Zsh hackers list References: <20050109164753.GA4246@sc> <1050109203218.ZM22780@candle.brasslantern.com> <20050110094918.GA4432@sc> <1050110165325.ZM26928@candle.brasslantern.com> <20050110171101.GD4432@sc> <1050110192041.ZM27325@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1050110192041.ZM27325@candle.brasslantern.com> User-Agent: Mutt/1.5.6i X-OriginalArrivalTime: 11 Jan 2005 09:07:02.0991 (UTC) FILETIME=[EA4AF5F0:01C4F7BC] X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: * X-Spam-Status: No, hits=1.5 required=6.0 tests=RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 1.5 On Mon, Jan 10, 2005 at 07:20:41PM +0000, Bart Schaefer wrote: > On Jan 10, 5:11pm, Stephane Chazelas wrote: > } Subject: Re: multios and unnecessary processes > } > } However to get back to my initial statement, don't you agree > } it's a problem that > } > } cmd >&2 >&- >&2 > } > } doesn't redirect stdout to stderr but to a pipe to a background > } process that just echos the output to stderr? > > Yes, that could be considered a bug. Suggested patch below. > > But under what circumstances would you write that? [...] Hi, thanks for the patch (I've not tested it yet). As I said in a previous mail, I came accross that when trying to cancel a multios: { cmd 2>&1 >&- >&3 | grep -v do-not-want-that-error-message } 3>&1 Without >&-, cmd's stdout would have gone to the terminal and to grep, and I just wanted cmd's stderr to go to grep. At that time, I didn't know of: (cmd 2>&1 >&3) | grep ... -- Stéphane