From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id f9e61d5a for ; Mon, 1 Jul 2019 16:22:49 +0000 (UTC) Received: (qmail 27010 invoked by alias); 1 Jul 2019 16:22:42 -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: List-Unsubscribe: X-Seq: 44474 Received: (qmail 6380 invoked by uid 1010); 1 Jul 2019 16:22:42 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm1-f50.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25496. spamassassin: 3.4.2. Clear:RC:0(209.85.128.50):SA:0(-2.0/5.0):. Processed in 1.753336 secs); 01 Jul 2019 16:22:42 -0000 X-Envelope-From: stephane.chazelas@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.128.50 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=xI9WyLSXEyYajkkQNaJlLi0R/GG20WwNj89Xvp5inK0=; b=lMgsHWYBU84ZVYJhpH3diiWefI4hCHjYlVhl3hbcTKBW08rcQR6prOmCklh+S3xc49 0sG9kHreMjV8x5ZP86gnSSd0iV4naqOkDpcSNEhw3x5KAEPMW4Na38TGH675Q+be9CJE KDfNIjQOJFiFLMO1snwEcVUcOFVDHeT7tWSW8MV+z8wOLJwXDlJjEs8qAEgEO/pHRdvZ S8xcJxQl+UGfsqJsT3l4xlZPpc3+FjRanQ58q2YsEopn3Pisdit/P5aztKlL+4LdYexw ankxO8xwT4VHntGYhuYkoTfR439toxOJC4Q/aN86bpUxRFvoGqiD+2mgngjxMink+oQn kcqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=xI9WyLSXEyYajkkQNaJlLi0R/GG20WwNj89Xvp5inK0=; b=CWVr39wwqkwmBOE3h2HEXIbVlte3Ekj1ow5xGDeaACJXiLula+6fGtGA5AOUkQpcMZ w8DFvOPM+g/rhYps1aypepY+8/7NFmk0Rbp96l/Nn+Es/osjU749vZ6OCnZEuLsR1eNs +63Dxnk+/lhstLo7OeHX3qUGzqW7/SlqGzqAizZRmffnSOeC1gm9FEOC9VDpo/Oc1KDc 5KjkqKGjIb/TeX7Fld9gTvPTE+Z+/uRMQB5/sGwNiJJlsl0S4XrzKiH8zr+RAIAkK6AK HBzAsLeVaeP5BIIYWG1zpGYRNA78V4CXiUyNfWdb3rPwUWlWL5KQdSwgLmUiG2xOr8cu 50VA== X-Gm-Message-State: APjAAAXchq7HVaVuXhQf2zP9q6XMbAUrLfhSKpSlW2s3QekGxwuQteu9 mMmySzjJGdK6KtkbcIp8BPE= X-Google-Smtp-Source: APXvYqzDSkcaao/bSxZBZXjZR7MmwOQEgo2Y2XaJbgiwO3Qe+vK1n+MIBXKIS81S2TEeH4JklDpvhQ== X-Received: by 2002:a1c:7e14:: with SMTP id z20mr60985wmc.83.1561998125541; Mon, 01 Jul 2019 09:22:05 -0700 (PDT) Date: Mon, 1 Jul 2019 17:22:02 +0100 From: Stephane Chazelas To: Peter Stephenson Cc: zsh-workers@zsh.org Subject: Re: <(...), >(...) and fds above 9 Message-ID: <20190701162202.5o3cxahc75e2hucz@chaz.gmail.com> Mail-Followup-To: Peter Stephenson , zsh-workers@zsh.org References: <20190701100001.hbegs7zyu2auckhf@chaz.gmail.com> <1561975733.6006.2.camel@samsung.com> <1561994908.6006.19.camel@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1561994908.6006.19.camel@samsung.com> User-Agent: NeoMutt/20171215 2019-07-01 16:28:28 +0100, Peter Stephenson: [...] > Looks like =(...) doesn't call closem() at all when > forking, hence the difference in behaviour.  So > =(...) is the odd one out. [...] But is there a good reason why we should close those fds? I had to work around it in my case (something like: join <(sort /dev/fd/$fd) <(sort /dev/fd/$fd2) ) Another difference is that the stdin redirection to /dev/null is not done for the =(...) form: $ zsh -c 'cat =(ls -l /proc/self/fd)' total 0 lrwx------ 1 stephane stephane 64 Jul 1 17:17 0 -> /dev/pts/13 l-wx------ 1 stephane stephane 64 Jul 1 17:17 1 -> /tmp/zshiMCdiC lrwx------ 1 stephane stephane 64 Jul 1 17:17 2 -> /dev/pts/13 lr-x------ 1 stephane stephane 64 Jul 1 17:17 3 -> /proc/818/fd $ zsh -c 'cat <(ls -l /proc/self/fd)' total 0 lrwx------ 1 stephane stephane 64 Jul 1 17:17 0 -> /dev/null l-wx------ 1 stephane stephane 64 Jul 1 17:17 1 -> pipe:[2995406] lrwx------ 1 stephane stephane 64 Jul 1 17:17 2 -> /dev/pts/13 lr-x------ 1 stephane stephane 64 Jul 1 17:17 3 -> /proc/829/fd -- Stephane