From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15311 invoked by alias); 14 Oct 2013 16:29:04 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18029 Received: (qmail 20497 invoked from network); 14 Oct 2013 16:28:58 -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 X-AuditID: cbfec7f5-b7ef66d00000795a-93-525c1bc77576 Date: Mon, 14 Oct 2013 17:28:54 +0100 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: process substitution bug with set -e? Message-id: <20131014172854.70e2c3ce@pwslap01u.europe.root.pri> In-reply-to: <20131014150845.GB31070@ypig.lip.ens-lyon.fr> References: <20131014124126.GA31070@ypig.lip.ens-lyon.fr> <20131014144838.6ec034dd@pwslap01u.europe.root.pri> <20131014150845.GB31070@ypig.lip.ens-lyon.fr> 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+NgFuphluLIzCtJLcpLzFFi42I5/e/4Nd3j0jFBBnPfaVjsOLmS0YHRY9XB D0wBjFFcNimpOZllqUX6dglcGecaTrAXPGerWDZzIWMD4wLWLkZODgkBE4lZ56ZB2WISF+6t Z+ti5OIQEljKKPGpeSUzlMMk8XDvSUaQKhYBVYlfLxaBdbAJGEpM3TQbLC4iICqxfMVmdhBb WMBI4uOnLjCbV8BeYsPDp0D1HBycAlYSM9uZQMJCAvMZJSae0Qex+QX0Ja7+/cQEcYS9xMwr ZxghWgUlfky+xwJiMwtoSWze1sQKYctLbF7zlnkCo8AsJGWzkJTNQlK2gJF5FaNoamlyQXFS eq6RXnFibnFpXrpecn7uJkZICH7dwbj0mNUhRgEORiUe3gCBmCAh1sSy4srcQ4wSHMxKIry5 b6ODhHhTEiurUovy44tKc1KLDzEycXBKNTAmBhhX3VX31NH9pP79WBBD6fSXWnXB4qu4frtn dEVtNZ5T7f96/ew0KeeWC1ctNxwPkmnW3sb689fljrvdzZeSjk2UDWfiOW510P6a4M3PfjG+ HyoONAhPaC71eRXPZcqXIvD+eKvOqZ6zqhNMlGJemdTO1Z1jNLOHl2Xb76TWm8d+iy2VP6LE UpyRaKjFXFScCADSITvSHwIAAA== On Mon, 14 Oct 2013 17:08:45 +0200 Vincent Lefevre wrote: > I can see that it has the same behavior as, for instance: > > { echo foo; exit } >>(sleep 1; cat -n) > > Again, one may wonder whether the shell should exit immediately. > Is this clearly documented somewhere? These interactions between different features are definitely not clearly documented. This formally quadratic problem --- it's not actually as bad as (features)**2, of course --- is still fairly horrific in the case of zsh. I note that with a subshell, in ( echo foo ) >>(sleep 10; cat -n) the shell waits but in ( echo foo; exit ) >>(sleep 10; cat -n) it doesn't. So this must mean the logic for waiting is inside the subshell. This surprised me. I don't know if this has implications for what's going on in the case of { ... }. pws