-
Notifications
You must be signed in to change notification settings - Fork 178
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
Suspend (Ctrl-Z) and Quit (Ctrl-\) not handled #20
Comments
I don't think I can use default signal handling. I will probably implement some type of handler for C-z and C-\ so that we can reset the terminal attributes before generating the proper signals. I am looking at GNU readline's doc and it seems like readline takes this approach. |
As far as I could see, there is a |
It looks like that is defined by default in http://git.savannah.gnu.org/cgit/readline.git/tree/rlconf.h so I'd be surprised if the compiled library version you are using does not have that defined. Looking at https://cnswww.cns.cwru.edu/php/chet/readline/readline.html#SEC44 and http://git.savannah.gnu.org/cgit/readline.git/tree/signals.c I do see that the readline's signal handler cleans up the terminal state and and then re-raises the signal. |
2.0 released |
Since rustyline removes the
ISIG
flag from the terminal, pressing Ctrl-Z or Ctrl-\ will insert a character instead of suspending/quitting the process. Especially suspend is quite essential for any CLI program.Please consider using the default signal handling, or implementing some kind of handler for Ctrl-Z and Ctrl-\ that generates the signals.
The text was updated successfully, but these errors were encountered: