From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25276 invoked by alias); 24 Apr 2018 11:31:07 -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: 42711 Received: (qmail 28921 invoked by uid 1010); 24 Apr 2018 11:31:07 -0000 X-Qmail-Scanner-Diagnostics: from kahlil.inlv.org by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(37.59.109.123):SA:0(-1.9/5.0):. Processed in 1.984707 secs); 24 Apr 2018 11:31:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: martijn@inlv.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Subject: Re: [BUG] process substitution breaks when nested or traverses a function To: Zsh hackers list References: <20180424104335.24dfe68e@camnpupstephen.cam.scsc.local> <1524565816.2838053.1348774976.23F51BA1@webmail.messagingengine.com> <20180424114717.23a00f3c@camnpupstephen.cam.scsc.local> From: Martijn Dekker Message-ID: <8d21cc5b-7e12-ff70-a9c1-1eb9973b492d@inlv.org> Date: Tue, 24 Apr 2018 13:09:27 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180424114717.23a00f3c@camnpupstephen.cam.scsc.local> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Op 24-04-18 om 12:47 schreef Peter Stephenson: > On Tue, 24 Apr 2018 10:30:16 +0000 > Daniel Shahaf wrote: >> I don't know about "better", but I'd looked into this and wondered why >> getproc() had two compile-time alternative implementations, one with >> mkfifo() and one with /proc/self. Is this just about portability, >> or...? > > Using a file descriptor is neater, because there's less cruft in the > regular file system to clear up (and fewer associated security worries > etc. etc.); however, /proc/self isn't guaranteed to be available on > older systems, whereas FIFOs have been around for a good quarter > century. /proc/self (or /proc in general) is not available on some very much current systems either, including at least macOS and OpenBSD. /dev/fd is available on both of those, though. - M.