Closed jpco closed 1 month ago
The problem here is similar to #111, actually. fdfill()
, which is what's fetching input for snarfheredocs()
, reads 0 characters at some point due to the ^D
, so it dutifully closes down the input (close(in->fd)
and the next few lines). Then the expected stuff happens -- a syntax error exception is thrown, the repl retries, and on the next read the shell sees the input has been closed down so an eof
exception gets thrown and the shell exits.
So what's desirable seems to be to prevent shutting down the input while reading a heredoc. Will have to be careful to make sure this correctly handles both the "don't kill the interactive session" and "don't hang after falling off the end of a script" cases.
and the shell dies.
(http://wryun.github.io/es-shell/mail-archive/msg00733.html)