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 c9ccdb94 for ; Tue, 2 Jul 2019 15:20:05 +0000 (UTC) Received: (qmail 4134 invoked by alias); 2 Jul 2019 15:19:58 -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: 44483 Received: (qmail 18014 invoked by uid 1010); 2 Jul 2019 15:19:58 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm1-f52.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.52):SA:0(-2.0/5.0):. Processed in 2.314006 secs); 02 Jul 2019 15:19:58 -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.52 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=4vtTm2DYayCrSOMLrSAhUGlRKb+CongJ84VoPKENXbc=; b=byTmLwpMy9GOizZCJEnlQpXHldo8TtPH/sMLN1GRb/cXrfKUNFIcKDFHVFmbztosUz 7IMLn8ny8AIGGbivrdxPBN2485Kz6cMt6Oivqf4/AF9ekVLHeCyfhTOImGBLw2Lk5JUS V3nlCVysH6Uy+VRoCHXZ+WrP+jvvhbNRQ6AD9BB+3RyjYbRa5GWrEGWsAL/ARXajl5Wx aUVjDdHruvun5+QFGSElSHdzegmTHMK67O0YfILG49k1gXd5jEX48RRVnk62kwEmIAt0 N7lVTvUq/5YwK1op+iXn06k4LGTaI4uT7PDrFT2FiB2xwM6gI7cED90ZjpQtq2Lmum/m 8t9w== 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=4vtTm2DYayCrSOMLrSAhUGlRKb+CongJ84VoPKENXbc=; b=L0D36hNfsjJxW4sWWgJf1qQKXjvG0fw5PxLi2RQHu8sW0lgtgS3b+f1UM/cNgq76b0 LwiRKIbmGmiIwWOt7azQoF29dlzbBeOCZ69XXU3x5VFZEtlJ6wNLAw67GYwKwpuIXUvv QCxgleL0RivRpz27/BUX9yKrT4MAmvYTj+cHTZdxCb2dKkWn+XhqsxWatoWNIWAS14N5 aFZRK43m7/WW14RhNPl13FntPqmgOwNzkPsUro6gZYyuow0dLj9TEfJlQTVntBmGhOma k0lRklMhjFuZLhuVvZ/GxTCn7zGO88Nrdp0H+vPr1W96amOPmlQazTVIvRIQ4XjndriD mPVQ== X-Gm-Message-State: APjAAAW4gLLobBdY/oe5S3aunIa5tkFbfSURJjGdNNCbO6R1K+Ncs3jS dYlsdPnnPI9hwjgdsTGTdgo= X-Google-Smtp-Source: APXvYqzcVOw5pbT66ba7u58syFjdzZa2AmmJl0TtKUowfYlM/oLkT2Uerk+r1PkfIeQi3wU5T1pkEg== X-Received: by 2002:a05:600c:2549:: with SMTP id e9mr3928378wma.46.1562080761326; Tue, 02 Jul 2019 08:19:21 -0700 (PDT) Date: Tue, 2 Jul 2019 16:19:18 +0100 From: Stephane Chazelas To: Peter Stephenson Cc: "zsh-workers@zsh.org" Subject: Re: <(...), >(...) and fds above 9 Message-ID: <20190702151918.iysfgd4tpb37ladw@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> <20190701162202.5o3cxahc75e2hucz@chaz.gmail.com> <1561999973.6006.21.camel@samsung.com> <1562057976.5684.3.camel@samsung.com> <20190702122018.mytrtge3rq42nouf@chaz.gmail.com> <1562073155.5684.17.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: <1562073155.5684.17.camel@samsung.com> User-Agent: NeoMutt/20171215 2019-07-02 13:12:35 +0000, Peter Stephenson: > On Tue, 2019-07-02 at 13:20 +0100, Stephane Chazelas wrote: > > 2019-07-02 09:59:36 +0100, Peter Stephenson: > > 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) > > This will do that for file descriptors managed with varid or builtins from > modules, though it doesn't change the behaviour for file descriptors > managed directly by number.  I'm wondering if that's too traditional to > be worth any pain of changing --- {fd} is a much more manageable > interface. [...] Note that I was not suggesting that zsh should do the same. That close-on-exec on ksh93 adds more confusion than it helps. No other shell does it AFAIK. That means that you need to work around it like: exec 7<> some-file ... cmd /dev/fd/7 7>&7 to work around it. Or make sure to use { ... cmd /dev/fd/7 ... } 7<> some-file And not "exec". -- Stephane