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

  1. reproduced on:
  2. 8.6.6, 8.6.5, 8.5.19, fossil_trunk (Linux x86_64)
  3.  
  4. Only occurs interactively.
  5.  
  6. $ tclsh
  7. % open "|cat > /dev/null"
  8. can't read output from command: standard output was redirected
  9. % open "|cat > /dev/null 2> /dev/null < /dev/null" r
  10. can't read output from command: standard output was redirected
  11. % open "|cat > /dev/null 2> /dev/null < /dev/null" w
  12.  
  13. (hangs indefinitely)
  14.  
  15. gdb reports:
  16.  
  17. ^C
  18. Program received signal SIGINT, Interrupt.
  19. 0x00007ffff7401d90 in __read_nocancel () from /lib64/libpthread.so.0
  20. (gdb) bt
  21. #0 0x00007ffff7401d90 in __read_nocancel () from /lib64/libpthread.so.0
  22. #1 0x00007ffff7b62c25 in FileInputProc () from /home/aspect/Tcl/Env/lib/libtcl8.7.so
  23. #2 0x00007ffff7b11912 in ChanRead () from /home/aspect/Tcl/Env/lib/libtcl8.7.so
  24. #3 0x00007ffff7b11af7 in GetInput () from /home/aspect/Tcl/Env/lib/libtcl8.7.so
  25. #4 0x00007ffff7b122c9 in FilterInputBytes () from /home/aspect/Tcl/Env/lib/libtcl8.7.so
  26. #5 0x00007ffff7b12666 in Tcl_GetsObj () from /home/aspect/Tcl/Env/lib/libtcl8.7.so
  27. #6 0x00007ffff7b27b1e in Tcl_MainEx () from /home/aspect/Tcl/Env/lib/libtcl8.7.so
  28. #7 0x0000000000400864 in main ()
  29.