Skip to content

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

Answered by mvdan
prologic asked this question in Q&A

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

You must be logged in to vote
2 replies
@prologic

@mvdan

Answer selected by mvdan

You must be logged in to vote
5 replies
@mvdan

@prologic

@prologic

@mvdan

@prologic

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