Skip to content
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

Geth console unresponsive when running js statement #23344

Closed
lightclient opened this issue Aug 6, 2021 · 1 comment · Fixed by #23387
Closed

Geth console unresponsive when running js statement #23344

lightclient opened this issue Aug 6, 2021 · 1 comment · Fixed by #23387
Assignees
Labels

Comments

@lightclient
Copy link
Member

lightclient commented Aug 6, 2021

I would expect to be able to stop a statement (e.g. a loop) with Ctrl+C or Ctrl+D, but it just carries right along.

@gballet
Copy link
Member

gballet commented Aug 11, 2021

Ctrl+D would be a counter-intuitive key combination for interrupting a statement. Ctrl+C is the right key combination, but is already mapped to quitting geth.

One idea would be to change the semantics of Ctrl+C to:

  • When using the console command, interrupt the running js statement. Ctrl+D then quits geth, as it does in other command line tools like shells or script interpreters.
  • Outside of console mode, quit geth.

EDIT: Ctrl+D already has the expected behavior, so the issue is with Ctrl+c

holiman added a commit to holiman/go-ethereum that referenced this issue Aug 12, 2021
s1na pushed a commit to s1na/go-ethereum that referenced this issue Dec 2, 2021
fjl added a commit that referenced this issue Dec 11, 2021
Previously, Ctrl-C (SIGINT) was ignored during JS execution, so it was not
possible to get out of infinite loops in the console. With this change,
Ctrl-C now interrupts JS.

Fixes #23344

Co-authored-by: Sina Mahmoodi <[email protected]>
Co-authored-by: Felix Lange <[email protected]>
JacekGlen pushed a commit to JacekGlen/go-ethereum that referenced this issue May 26, 2022
Previously, Ctrl-C (SIGINT) was ignored during JS execution, so it was not
possible to get out of infinite loops in the console. With this change,
Ctrl-C now interrupts JS.

Fixes ethereum#23344

Co-authored-by: Sina Mahmoodi <[email protected]>
Co-authored-by: Felix Lange <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants