From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2861 invoked by alias); 18 Jul 2013 09:32:40 -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: 31534 Received: (qmail 22534 invoked from network); 18 Jul 2013 09:32:34 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at samsung.com does not designate permitted sender hosts) X-AuditID: cbfec7f4-b7fd76d0000035e1-d0-51e7b3d4494a Date: Thu, 18 Jul 2013 10:22:27 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: bug with eval, proc-subst and pipes Message-id: <20130718102227.527429bd@pwslap01u.europe.root.pri> In-reply-to: <20130718095741.3f54725f@pwslap01u.europe.root.pri> References: <20130715133525.GA7694@chaz.gmail.com> <130715100624.ZM14123@torch.brasslantern.com> <20130716215540.22d88a27@pws-pc.ntlworld.com> <130717000027.ZM15643@torch.brasslantern.com> <20130717201733.2c0b029b@pws-pc.ntlworld.com> <20130718095741.3f54725f@pwslap01u.europe.root.pri> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplluLIzCtJLcpLzFFi42I5/e/4Nd0rm58HGny+L2VxsPkhkwOjx6qD H5gCGKO4bFJSczLLUov07RK4Mo5OWslS0MJecf7vafYGxmusXYycHBICJhJ3Gw8zQdhiEhfu rWfrYuTiEBJYyijxb81JZghnOZPEh6kfwKpYBFQlfu+6zgxiswkYSkzdNJsRxBYREJc4u/Y8 C4gtLGAgsbzlJFCcg4NXwF7i5WJFkDCngIPEpYmvGSFmvmeSaHmzE2wOv4C+xNW/n6CusJeY eeUM2ExeAUGJH5Pvgc1kFtCS2LytiRXClpfYvOYt8wRGgVlIymYhKZuFpGwBI/MqRtHU0uSC 4qT0XEO94sTc4tK8dL3k/NxNjJAg/LKDcfExq0OMAhyMSjy8hvzPA4VYE8uKK3MPMUpwMCuJ 8JabAYV4UxIrq1KL8uOLSnNSiw8xMnFwSjUwChzVlUuP4W/fVWnYkMfmOMePMaGfY8eXtaaR MTy60YkyHYwnuw9p7H6nZRX0/lLlkwPf9PY1mM/W/3ZGbWmLFFuU/zHb5Jns1/+cjVWouiS2 sefUsXbW3eX31D7w8IlKJS98d+0Nx9xjdZo7fv1Q95Bq2uaWeqvwl5eOy6mXJ703Hp6gvFlC iaU4I9FQi7moOBEAFoFPEiACAAA= On Thu, 18 Jul 2013 09:57:41 +0100 Peter Stephenson wrote: > Will it be good enough to go through all process substitution output > file descriptors for a job when we enter zwaitjob() and close them? I > think at that point nothing more can write from the main shell process, > and subprocesses in any case have to manage their own copies of the file > descriptor. Thinking about it, it would presumably be safe just to close all temporary file descriptors at that point, including input, since there's nothing in the job that can read input now, either. So there's no need to distinguish input and output. We keep the existing close logic as a backup. I don't think it's safe to delete temporary files yet, however, since unlike the file descriptors, which are local to the process, those can be accessed directly by subprocesses still running. pws