Bash heredoc on FD 3

Eliot Moss moss@cs.umass.edu
Mon Dec 3 17:28:00 GMT 2018


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



More information about the Cygwin mailing list