From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9510 invoked by alias); 6 Feb 2011 19:33:13 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28713 Received: (qmail 18702 invoked from network); 6 Feb 2011 19:33:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at ntlworld.com designates 81.103.221.56 as permitted sender) Date: Sun, 6 Feb 2011 19:00:51 +0000 From: Peter Stephenson To: Zsh Hackers' List Subject: Re: I/O to shell function in zsh coproc Message-ID: <20110206190051.423887bb@pws-pc.ntlworld.com> In-Reply-To: <110205100816.ZM26346@torch.brasslantern.com> References: <110205100816.ZM26346@torch.brasslantern.com> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.0; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.1 cv=JvdXmxIgLJv2/GthKqHpGJEEHukvLcvELVXUanXFreg= c=1 sm=0 a=fKlDHlkY_DwA:10 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=NLZqzBF-AAAA:8 a=IuVxi3FlPld1jZX-IEgA:9 a=37CeA39NL_FyI7PHDXXGJvLziEQA:4 a=CjuIK1q_8ugA:10 a=I6wTmPyJxzYA:10 a=_dQi-Dcv4p4A:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 On Sat, 05 Feb 2011 10:08:16 -0800 Bart Schaefer wrote: > You're right, there is a bug there. I'm not immediately sure where to > fix it, but there's a workaround. > > The bug is that when you do 'coproc shellfunction', zsh has to fork a > subshell to run the shellfunction in another process. The trouble is > that the subshell therefore gets copies of the coprocess descriptors > that are open in the parent shell. (More dirty washing also moved to zsh-workers.) It's not as simple as setting FD_CLOEXEC for coproc descriptors, then? -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/