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

Respect SIG_IGN for SIGTSTP (Terminal SToP) #3321

Open
AlexanderBrevig opened this issue Aug 3, 2022 · 3 comments
Open

Respect SIG_IGN for SIGTSTP (Terminal SToP) #3321

AlexanderBrevig opened this issue Aug 3, 2022 · 3 comments
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@AlexanderBrevig
Copy link
Contributor

Describe your feature request

When using shells without job control (such as https://elv.sh), respect the SIG_IGN that's set for SIGTSTP so C-z does not suspend Helix.

When I C-z now, the only way out (that I've found) is to do a hard shutdown of the terminal.

I have lost quite a lot of work because of this. (Yes, I know I could use a different shell but I'm weird like that).

elves/elvish#1017

@n8henrie
Copy link

Shame that #3322 was closed -- looks like it was close?

This is still an issue with nushell and helix 23.10. Oh, looks like 24.03 was released a few minutes ago -- will also try with that.

@jrvidal
Copy link
Contributor

jrvidal commented Apr 1, 2024

@archseer I see that #3322 was dismissed in favor of letting signal-hook take care of it. You mentioned in #3322 (review):

I do see they have a check for SIG_IGN: https://github.com/vorner/signal-hook/blob/1236c57dc8a319a410d0c3a68dcd1fc0aa8488a2/signal-hook-registry/src/lib.rs#L236

I don't think that check would work for us: that is about running a previously installed handler if there is any (i.e. if, among other things, it was not set to SIG_IGN). But calling Signals::new(...) always overwrites an existing SIG_IGN.

Could we maybe reopen #3322 and open an upstream issue to see if they can accommodate our use case?

@AlexanderBrevig
Copy link
Contributor Author

To be honest I just gave up on it after five months.
I'm of course OK with reopening the PR and do another pass - if the intention of merging it is clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants