summaryrefslogtreecommitdiff
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorEnami Tsugutomo <tsugutomo.enami@jp.sony.com>2011-10-25 12:27:47 +0800
committerChong Yidong <cyd@gnu.org>2011-10-25 12:27:47 +0800
commite112cc3727670af0514df84f372e4d640d52ed20 (patch)
treecd2feb1b9b3f1fa3aa554de27c3966024bc6570a /src/sysdep.c
parentdf6d30f325a57fe0bc60025f391a41e27794c8f5 (diff)
downloademacs-e112cc3727670af0514df84f372e4d640d52ed20.tar.gz
* sysdep.c (init_sys_modes): Fix the check for the controlling terminal.
Fixes: debbugs:6649
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index b0d5a1abbe3..d666f8dbb79 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -854,6 +854,7 @@ void
init_sys_modes (struct tty_display_info *tty_out)
{
struct emacs_tty tty;
+ Lisp_Object terminal;
Vtty_erase_char = Qnil;
@@ -907,7 +908,9 @@ init_sys_modes (struct tty_display_info *tty_out)
tty.main.c_cflag &= ~PARENB;/* Don't check parity */
}
#endif
- if (tty_out->input == stdin)
+
+ XSETTERMINAL(terminal, tty_out->terminal);
+ if (!NILP (Fcontrolling_tty_p (terminal)))
{
tty.main.c_cc[VINTR] = quit_char; /* C-g (usually) gives SIGINT */
/* Set up C-g for both SIGQUIT and SIGINT.