Posted to tcl by aspect at Sat Nov 26 23:49:23 GMT 2016view pretty

reproduced on:
  8.6.6, 8.6.5, 8.5.19, fossil_trunk (Linux x86_64)

Only occurs interactively.

$ tclsh
% open "|cat > /dev/null"
can't read output from command: standard output was redirected
% open "|cat > /dev/null 2> /dev/null < /dev/null" r
can't read output from command: standard output was redirected
% open "|cat > /dev/null 2> /dev/null < /dev/null" w

(hangs indefinitely)

gdb reports:

^C
Program received signal SIGINT, Interrupt.
0x00007ffff7401d90 in __read_nocancel () from /lib64/libpthread.so.0
(gdb) bt
#0  0x00007ffff7401d90 in __read_nocancel () from /lib64/libpthread.so.0
#1  0x00007ffff7b62c25 in FileInputProc () from /home/aspect/Tcl/Env/lib/libtcl8.7.so
#2  0x00007ffff7b11912 in ChanRead () from /home/aspect/Tcl/Env/lib/libtcl8.7.so
#3  0x00007ffff7b11af7 in GetInput () from /home/aspect/Tcl/Env/lib/libtcl8.7.so
#4  0x00007ffff7b122c9 in FilterInputBytes () from /home/aspect/Tcl/Env/lib/libtcl8.7.so
#5  0x00007ffff7b12666 in Tcl_GetsObj () from /home/aspect/Tcl/Env/lib/libtcl8.7.so
#6  0x00007ffff7b27b1e in Tcl_MainEx () from /home/aspect/Tcl/Env/lib/libtcl8.7.so
#7  0x0000000000400864 in main ()