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 7d1c3414 for ; Tue, 2 Jul 2019 12:21:09 +0000 (UTC) Received: (qmail 20727 invoked by alias); 2 Jul 2019 12:21:00 -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: 44481 Received: (qmail 14192 invoked by uid 1010); 2 Jul 2019 12:21:00 -0000 X-Qmail-Scanner-Diagnostics: from mail-wr1-f53.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.221.53):SA:0(-2.0/5.0):. Processed in 3.787985 secs); 02 Jul 2019 12:21:00 -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.221.53 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=QKXuDpWrphlTWckqHzTdCz0TWxhdiGBCkrE8sVzOxkg=; b=LDWgyPLjh2oxbT3usoeKxE8wl5ahAldx0jeX1dmoRZNvh/Q7YPwjBYtM7Ewioz/rRK HEjPGOqLeu1QtLabrPvl5s4P6OWE039rAITIuQFKjPk3GgKALJof3BIvucemGJjqcQb4 m2YSGrLh4J7EpMP0iCPNdqg3VUVDJozv9SkwEci1wPccg0tY0RtCZkLGwJPNlS2sPFTx 3qW9s0ssUpU4rZbvrIbXTZa04Tanuq20AdaEt3Dm4A92Q1e6M1CY4CPxMikvm3YMNcMX glQlSvglts52ZQgKaHjummx2HPIAPYPlMYAvnGq++JzbUCE5zKUF7dnOVIqjCYyPWiiS mwQQ== 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:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=QKXuDpWrphlTWckqHzTdCz0TWxhdiGBCkrE8sVzOxkg=; b=qjMzXGA8MZ4bCNpW1cdYH2l/Y3MTFMIsHFpJOReIGzHh0yk8MQ0ilM5H+HofSdDKxP yn9ewZ6lpwDducvGcysyt/AcrscROxfyGwuCbzOACppIzydbCVq0ykVkbwppktjh3+a/ 3/OEBDjjR7DzeBt9O0v41jp1Gc46jnAAfTXZlnaftXrA73pnAwp9VoCZZ9JHgVX+H9Xx tF+9DcE7IKQhLtcg5+67eCvpB6KNlNyywWVjDLn/Q7JDtt7u1EfZu58dxLFKgPlzKrba MmG7elHE2fRsdRVmZcqW6FFWZfWC/ltG9hEVvZQiZphdBoZqnFk282um366UtgVBaiih UNxA== X-Gm-Message-State: APjAAAVTceherRnqe1cmqm+RydC6FaOaW3X/xYKIBfGPPM0irBvLgd+A kVBK6mr7xjVEF1nEjEv7iW+YKVxn X-Google-Smtp-Source: APXvYqw5xSl1MtZaLR0Qkkjj3BgmWwssSvRwWskAfF0xpiPr3MAY4X+LHFeoKdteFNDbe4EohNM9gw== X-Received: by 2002:a5d:4908:: with SMTP id x8mr22856803wrq.290.1562070021294; Tue, 02 Jul 2019 05:20:21 -0700 (PDT) Date: Tue, 2 Jul 2019 13:20:18 +0100 From: Stephane Chazelas To: Zsh hackers list Subject: Re: <(...), >(...) and fds above 9 Message-ID: <20190702122018.mytrtge3rq42nouf@chaz.gmail.com> Mail-Followup-To: Zsh hackers list References: <20190701100001.hbegs7zyu2auckhf@chaz.gmail.com> <1561975733.6006.2.camel@samsung.com> <1561994908.6006.19.camel@samsung.com> <20190701162202.5o3cxahc75e2hucz@chaz.gmail.com> <1561999973.6006.21.camel@samsung.com> <1562057976.5684.3.camel@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1562057976.5684.3.camel@samsung.com> User-Agent: NeoMutt/20171215 2019-07-02 09:59:36 +0100, Peter Stephenson: [...] > This fixes this up --- I think for file descriptors known to and hence > managed by the user the behaviour of silently closing is probably > uncontroversially unhelpful. [...] Thanks. Note that ksh93 marks the fds above 2 that are open with exec (exec 7< file or exec {fd}< file) with close-on-exec (independently of whether the exec is done in background or not) Neither ksh93 nor bash close the fds opened with { cat <(ls -l /proc/self/fd; } {fd}< file (that syntax doesn't work in zsh as already reported). Note another related problem that had also been reported earlier shared with bash but not ksh93: the fd is not closed after the command returned when the redirection is done on a builtin, function or compound command. $ zsh -c 'eval "echo \$fd" {fd}< a; ls -l /proc/self/fd/$fd' 12 lr-x------ 1 chazelas chazelas 64 Jul 2 13:14 /proc/self/fd/12 -> /home/chazelas/a -- Stephane