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

[tty/unix] Do not disable termios signals #757

Closed
andreistan26 opened this issue Jan 5, 2024 · 6 comments
Closed

[tty/unix] Do not disable termios signals #757

andreistan26 opened this issue Jan 5, 2024 · 6 comments

Comments

@andreistan26
Copy link
Contributor

For some use cases the signals should not be disabled, as there is no way to distinguish between SIGINT and SIGQUIT with the current Interrupt enum.

I am not familiar with the project but as far as i can see there is no way around it. If this is the case, i can open a PR with a fix for adding another config field.

@gwenn
Copy link
Collaborator

gwenn commented Jan 5, 2024

If possible, could you please provide a similar library (not necessarily in Rust) that does ?
And could you please confirm that your issue is related to ISIG here:

!(LocalFlags::ECHO | LocalFlags::ICANON | LocalFlags::IEXTEN | LocalFlags::ISIG);

?
Thanks.

@andreistan26
Copy link
Contributor Author

  1. I am not very familiar with libraries alike, so i cannot give any examples.
  2. Yes the issue is related to LocalFlags::ISIG". Due to the signals not being able to be handled within the interpreter using a signal handler. I am not sure about other the implications of removing ISIG via a config option , another solution would be to emit a more specific interrupt like SpecificInterrupt(SIGINT)

@andreistan26
Copy link
Contributor Author

i think that a simple config should do it, much like mortal. I will post a draft later

@andreistan26
Copy link
Contributor Author

Is there any way to print the signal specific chars. I would like to have:

  • ^C for ctrl+c
  • ^\ for ctrl+\

@gwenn
Copy link
Collaborator

gwenn commented Mar 6, 2024

Version 14.0.0 released

@gwenn gwenn closed this as completed Mar 6, 2024
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