On Wed, May 20, 2015 at 4:12 AM, Chet Ramey <chet.ra...@case.edu> wrote:
> On 5/19/15 1:42 AM, Pierre Gaston wrote: > > > The question really is (I discussed this with him on IRC) why can you do: > > > > $ cat <(read var </dev/tty;echo $var) > > blah > > blah > > > > but not: > > > > $ cat < <(read var </dev/tty;echo $var) > > bash: read: read error: 0: Input/output error > > I'm not sure where you can do this; I get EIO for both constructs on Mac > OS X, Fedora 21, RHEL 6, and Solaris 11 (what I happened to have available > today). > > The kernel returns -1/EIO because the shell started to run the process > substitution is ignoring SIGTTIN and the process attempts to read > from its controlling terminal (/dev/tty) while the terminal's process > group is set to different process group (making that shell a background > process group). > > -- > ``The lyf so short, the craft so long to lerne.'' - Chaucer > ``Ars longa, vita brevis'' - Hippocrates > Chet Ramey, ITS, CWRU c...@case.edu > http://cnswww.cns.cwru.edu/~chet/ > I get that on Centos 5.5 (linux 2.6.18) but I am indeed unable to reproduce it on other systems.