-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(cli/repl): keyboard interrupt should continue #7960
fix(cli/repl): keyboard interrupt should continue #7960
Conversation
This changes the behavior of keyboard interrupts (ctrl+c) to continue, clearing the current line instead of exiting. Exit can still be done with ctrl+d or by calling close().
It means interrupt, SIGINT after all. Anyway; based on prior art: Bash clears and continues. |
Maybe print "exit using ctrl+d or close()" again on ^c ? |
Since you phrased that as maybe, I think its a bit noisy, never liked Node doing it.
Been playing around with the new Runtime.terminateExecution method but that ends up killing the whole process which is somewhat unexpected. |
@nayeemrmn @caspervonb this is a long standing issue - #1725 - we need some kind of signal watchdog to implement that (I know tokio has APIs for that), and most likely tinker with |
In this case we are catching the signal, it's just a matter of what do we do with it but research required so out of scope for this PR. |
That sounds good to me, but I agree with @caspervonb that we should clear the input line on ^c. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This changes the behavior of keyboard interrupts (ctrl+c) to continue, clearing the current line instead of exiting.
Exit can still be done with ctrl+d or by calling close().