Skip to content

Behaviour of ^C (CTRL-C) handling #915

Answered by mvdan
prologic asked this question in Q&A
Discussion options

You must be logged in to vote

I assume this is a question for cmd/gosh, the main program that implements a fairly basic interactive shell?

There's a fairly easy answer here: we don't set up any signal handlers, so ^C has its default behavior, which is to kill the entire process :) We should probably teach gosh to do the right thing instead, which seems to be to discard the in-progress line and start a new line.

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@prologic
Comment options

@mvdan
Comment options

Answer selected by mvdan
Comment options

You must be logged in to vote
5 replies
@mvdan
Comment options

@prologic
Comment options

@prologic
Comment options

@mvdan
Comment options

@prologic
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants