You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above causes the REPL to go into an infinite loop as it exits except when the input file contains an actual "end of transmission" character (ascii code 4). I believe it has something to do with trying to exit while Readline::readline is waiting for input. I've tried to fix it a number of ways so far and failed.
Tried writing an end of transmission or newline character to $stdin so that Readline::readline could read it off, but it fails because $stdin is opened as read-only. Can't reopen $stdin as read-write.
Tried finding the child process that Readline::readline is using because killing that successfully exits the REPL. No luck, there's no cross-platform way to find child processes.
Looked into creating a writeable proxy IO object that Readline::readline will read from so we can forward $stdin and also write to it, but there's no declarative or event-driven way to forward $stdin to the proxy IO object.
The text was updated successfully, but these errors were encountered:
Any insight as to whether there's something unusual in REBL here? This sounds like a generic issue with Readline::readline to be worked around/with. If that's so, perhaps we can isolate a little 5-line example program that illustrates/isolates the problem?
It certainly could be a generic Readline::readline issue. I can easily reproduce #151 using Readline::readline in irb, but after trying for 15 minutes or so, I can't reproduce this issue in irb. I don't think REBL is doing anything particularly out of the ordinary here, though. I tried adding logging output in the vicinity of the loop construct and didn't see any output, but I don't think that's a trustworthy result since the program is already in a partially-exited state (which may no longer be able to output to stdout) when it goes into its infinite loop.
The above causes the REPL to go into an infinite loop as it exits except when the input file contains an actual "end of transmission" character (ascii code
4
). I believe it has something to do with trying to exit whileReadline::readline
is waiting for input. I've tried to fix it a number of ways so far and failed.$stdin
so thatReadline::readline
could read it off, but it fails because$stdin
is opened as read-only. Can't reopen$stdin
as read-write.Readline::readline
is using because killing that successfully exits the REPL. No luck, there's no cross-platform way to find child processes.IO
object thatReadline::readline
will read from so we can forward$stdin
and also write to it, but there's no declarative or event-driven way to forward$stdin
to the proxyIO
object.The text was updated successfully, but these errors were encountered: