From: Enami Tsugutomo Date: Tue, 25 Oct 2011 04:27:47 +0000 (+0800) Subject: * sysdep.c (init_sys_modes): Fix the check for the controlling terminal. X-Git-Tag: emacs-pretest-24.0.91~37^2~1^2~26 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e112cc3727670af0514df84f372e4d640d52ed20;p=emacs.git * sysdep.c (init_sys_modes): Fix the check for the controlling terminal. Fixes: debbugs:6649 --- diff --git a/src/ChangeLog b/src/ChangeLog index 3f9b5beeab6..cee48bd1731 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-10-25 Enami Tsugutomo + + * sysdep.c (init_sys_modes): Fix the check for the controlling + terminal (Bug#6649). + 2011-10-20 Eli Zaretskii * dispextern.h (struct bidi_it): New member next_en_type. 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.