From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120640 invoked by alias); 3 Dec 2018 17:28:22 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 120611 invoked by uid 89); 3 Dec 2018 17:28:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=BAYES_50,KAM_NUMSUBJECT,SPF_PASS autolearn=no version=3.3.2 spammy=cyg, eboyd53, Bash, pty2 X-HELO: mailsrv.cs.umass.edu Received: from mailsrv.cs.umass.edu (HELO mailsrv.cs.umass.edu) (128.119.240.136) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Dec 2018 17:28:20 +0000 Received: from [192.168.24.25] (eduroamgw.cs.umass.edu [128.119.40.194]) by mailsrv.cs.umass.edu (Postfix) with ESMTPSA id 5F744401DF60; Mon, 3 Dec 2018 12:28:18 -0500 (EST) Reply-To: moss@cs.umass.edu Subject: Re: Bash heredoc on FD 3 To: cygwin@cygwin.com References: <5c0427c5.1c69fb81.d71e5.c8ec@mx.google.com> From: Eliot Moss Message-ID: Date: Mon, 03 Dec 2018 17:28:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00036.txt.bz2 On 12/3/2018 10:43 AM, cyg Simple wrote: > Same for me and interestingly: > > $ ls -ld /dev/fd/* > ls: cannot access '/dev/fd/3': No such file or directory > ls: cannot access '/dev/fd/31': No such file or directory > lrwxrwxrwx 1 eboyd53 eboyd53 0 Dec  3 10:39 /dev/fd/0 -> /dev/pty2 > lrwxrwxrwx 1 eboyd53 eboyd53 0 Dec  3 10:39 /dev/fd/1 -> /dev/pty2 > lrwxrwxrwx 1 eboyd53 eboyd53 0 Dec  3 10:39 /dev/fd/2 -> /dev/pty2 Every process gets a standard input, output, and error file descriptor. Other exist only if they're opened. These are process-specific. What's mysterious about the reported case is that the 3<< ... did not seem to create a /dev/fd/3, at least not at the right "time" ... Regards - Eliot Moss -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple