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/