When the main process doesn't take responsibility for shutting down subprocesses, those subprocesses may not have access to the terminal and other resources that the main process owns when they run their shutdown hooks.
In the case of REPLy, this means we don't get the opportunity to reset the stty hooks that jline2 installs.
Maybe there's a different / better way to accomplish this? But this does appear to do the trick for me locally, at least in the context of the proof-of-concept app that @JacekLach posted: https://github.com/JacekLach/reply-breakage
Reported in trptcolin/reply#90
When the main process doesn't take responsibility for shutting down subprocesses, those subprocesses may not have access to the terminal and other resources that the main process owns when they run their shutdown hooks.
In the case of REPLy, this means we don't get the opportunity to reset the stty hooks that jline2 installs.
Maybe there's a different / better way to accomplish this? But this does appear to do the trick for me locally, at least in the context of the proof-of-concept app that @JacekLach posted: https://github.com/JacekLach/reply-breakage