mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-06 06:53:39 +00:00
Use signal, for linux
This commit is contained in:
parent
d5df056914
commit
428bd7cc6b
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ void cleanexit(int sig) {
|
|||
void enableRawMode(void) {
|
||||
tcgetattr(STDIN_FILENO, &orig_termios);
|
||||
atexit(disableRawMode);
|
||||
sigset(SIGINT, cleanexit);
|
||||
signal(SIGINT, cleanexit);
|
||||
struct termios raw = orig_termios;
|
||||
raw.c_lflag &= ~(ECHO | ICANON | IEXTEN);
|
||||
raw.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue