Ignore VDSUSP as a signal-sending key too, if platform defines it

This commit is contained in:
Paul LeoNerd Evans 2011-05-28 11:55:46 +01:00
parent d3f441330b
commit 6e99f8ab85
1 changed files with 4 additions and 0 deletions

View File

@ -287,6 +287,10 @@ static TermKey *termkey_new_full(int fd, int flags, size_t buffsize, int waittim
/* Disable Ctrl-\==VQUIT and Ctrl-D==VSUSP but leave Ctrl-C as SIGINT */
termios.c_cc[VQUIT] = _POSIX_VDISABLE;
termios.c_cc[VSUSP] = _POSIX_VDISABLE;
/* Some OSes have Ctrl-Y==VDSUSP */
#ifdef VDSUSP
termios.c_cc[VDSUSP] = _POSIX_VDISABLE;
#endif
}
tcsetattr(fd, TCSANOW, &termios);