Modified the shell TUI thread to exit if it receives an IOException when reading from stdin. (FELIX-729)