fix #6310 (new repl can't read from pipe)