delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/12/03/12:28:32

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=I6pmnCG5niNYLFl+
AWgkEL1rJZf3fGEkRvwV9o/mNpGee07xLEtE6j8mJGvQPIjDHbFQnTydGaBvEQH3
TWnSzyli9WUeWVSw2urRfxqo7HGLdmylwek//rwxuhNxB920dZfqIK4iU9+WDnAT
2rIjqbfZ269nrDn7h9pkxAvtpQo=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=2m1iTGAdYHpCSZPB5KTBkO
tzz10=; b=xOr3oIwMR9Twi+SumCjpyqPMfQx0uO/K+i67sLnFcyPFPa8K7r4sgC
6KM+yU85R7+SIAjZ3QVvOV3b2l6F17muq8gR59qoBdrzP/OoqWzTuiYAKz+9GjTc
P1lkyTLcOlahgtQB+OH9sNBt9NmLF30x6J1k7L2/UyaOYAVCtI4eY=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
Reply-To: moss AT cs DOT umass DOT edu
Subject: Re: Bash heredoc on FD 3
To: cygwin AT cygwin DOT com
References: <5c0427c5 DOT 1c69fb81 DOT d71e5 DOT c8ec AT mx DOT google DOT com> <b153a5b5-deea-c039-e93a-0555d8e2dba8 AT gmail DOT com>
From: Eliot Moss <moss AT cs DOT umass DOT edu>
Message-ID: <e3f44d50-04f5-db41-33b4-24fe51f91d34@cs.umass.edu>
Date: Mon, 3 Dec 2018 12:28:18 -0500
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: <b153a5b5-deea-c039-e93a-0555d8e2dba8@gmail.com>
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019