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

Behavior of Control-c (C-c, ^C, SIGINT) when no process is active #88

Closed
nwg opened this issue May 21, 2021 · 3 comments
Closed

Behavior of Control-c (C-c, ^C, SIGINT) when no process is active #88

nwg opened this issue May 21, 2021 · 3 comments

Comments

@nwg
Copy link

nwg commented May 21, 2021

Rash behavior for when no process is running and controlling terminal sends actual C-c seems like it might have a bug.

Phase 1

This is the output i get in rash for C-c C-c C-c "echo hi" RET

3:02 /Users/griswold/
> #(struct:exn:break user break #<continuation-mark-set> #<procedure>)
3:02 /Users/griswold/
^C#(struct:exn:break user break #<continuation-mark-set> #<procedure>)
3:02 /Users/griswold/
^C#(struct:exn:break user break #<continuation-mark-set> #<procedure>)
3:02 /Users/griswold/
echo hi  
echo hi
hi
3:02 /Users/griswold/
> 

Note the command i entered (echo hi) is repeated back to me.

Phase 2

After the echo finishes, further C-c presses generate nothing, but interestingly, upon one further press of C-c, a little bracket suddenly appears to the left of my current prompt. It's very small and just to the left of the >, i have to zoom in to see it.

image

What is that bracket? Is that a feature?

Note: on my Linux box, i have to press RET after every C-c to get the exn:break message. I guess my os x terminal seems to be sending something different to rash upon C-c that has the effective behavior of sending an additional RET on linux. Everything else appears to behave the same.

I am running Racket v8.1 [cs] on all systems.

Side note: In all shells i've used (zsh, bash, csh) sending a SIGINT clears the current line. I don't know how i got into the habit of using this to clear the line, maybe it is bad, but i use it all the time. I don't know what behavior is best for rash here, but just as a user report, it caught me off guard.

@nwg nwg changed the title Behavior of Control-c (C-c, ^C, SIGINT) when no app is running Behavior of Control-c (C-c, ^C, SIGINT) when no process is running May 21, 2021
@nwg nwg changed the title Behavior of Control-c (C-c, ^C, SIGINT) when no process is running Behavior of Control-c (C-c, ^C, SIGINT) when no process is active May 21, 2021
@nwg
Copy link
Author

nwg commented May 21, 2021

Oops, i didn't look long enough and it seems this is mostly a duplicate of #78. Hm. I guess it should be merged. The only new stuff here is the question about the little bracket and the explanation of the different behavior between darwin and linux.

@willghatch
Copy link
Owner

Hmm, I'm not sure what's up with the bracket. What terminal emulator are you using? At any rate, I'll probably close this issue and just leave #78 open unless this bracket thing ends up being important. But it might be related to the terminal emulator and the way C-c works.

@nwg
Copy link
Author

nwg commented May 24, 2021

@willghatch the bracket thing happens for me in the regular racket repl, too, so it's more of a general issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants