From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28849 invoked by alias); 18 Jul 2013 09:08:05 -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: 31532 Received: (qmail 29727 invoked from network); 18 Jul 2013 09:07:50 -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-d5-51e7ae065c2b Date: Thu, 18 Jul 2013 09:57:41 +0100 From: Peter Stephenson To: Vin Shelton , zsh-workers@zsh.org Subject: Re: bug with eval, proc-subst and pipes Message-id: <20130718095741.3f54725f@pwslap01u.europe.root.pri> In-reply-to: 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> 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+NgFprGLMWRmVeSWpSXmKPExsVy+t/xa7ps654HGnzrVLHYs/Eqm8XB5odM Dkwevye2M3usOviBKYApissmJTUnsyy1SN8ugSujeW9NwSWOigvXVrA0MD5g62Lk5JAQMJHY 82EOlC0mceHeeiCbi0NIYCmjxIsr15lAEkIC/UwSMxv1QWwWAVWJjT8Os4PYbAKGElM3zWYE sUUE7CU65m0HiwsLGEgsbzkJFucFiv//vxAszikQLNH26gkLxIKdTBJvfvaBbeYX0Je4+vcT E8QV9hIzr5yBahaU+DH5HguIzSygJbF5WxMrhC0vsXnNW+YJjAKzkJTNQlI2C0nZAkbmVYyi qaXJBcVJ6bmGesWJucWleel6yfm5mxghYfllB+PiY1aHGAU4GJV4eA35nwcKsSaWFVfmHmKU 4GBWEuEtNwMK8aYkVlalFuXHF5XmpBYfYmTi4JRqYMxfzeprvs1vq0JJJ9ujeoHVV75aNiyy q/w5UeFWtvjUrbLHQtcq+Z6qu/4to6Tx3JRnbjv6Hk79H35nkVT4b8N1UwzSNCweeMtMO/6s p+/Z6ckbFSdv5ik80lot7vix0rWg4cV50dg+VZ/tL0Q2nJcSZ/30X1FOJ3PT3ocleU8enzir +9dolaMSS3FGoqEWc1FxIgD9Gl1nKQIAAA== On Wed, 17 Jul 2013 23:50:25 -0400 Vin Shelton wrote: > "make check" now hangs and cannot be interrupted with ^C. Ah. I think it's this: outputfield2() { local -a args args=(${(s.,.)1}) print $args[1] echo 'How sweet the moonlight sits upon the bank' >$args[2] print $args[3] } outputfield2 muddy,>(sed -e s/s/th/g >outputfield2.txt),vesture The shell is waiting for the sed to finish but it doesn't because its input is still open, because we now don't close it until the job is finished. lsof seems to agree with me. We're going to have to be quite smart about when we close output file descriptors for process substitutions, because I think the problem we saw before applies just as much to output as to input. 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. pws