Why does `cat <(cat)` produce EIO?
问题 I have a program that reads from two input files simultaneously. I'd like to have this program read from standard input. I thought I'd use something like this: $program1 <(cat) <($program2) but I've just discovered that cat <(cat) produces .... mmap2(NULL, 139264, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb758e000 read(0, 0xb758f000, 131072) = -1 EIO (Input/output error) .... cat: -: Input/output error and similarly, $ cat <(read -n 1) bash: read: read error: 0: Input/output