]> git.eshelyaron.com Git - emacs.git/commitdiff
* sysdep.c (init_sys_modes): Fix the check for the controlling terminal.
authorEnami Tsugutomo <tsugutomo.enami@jp.sony.com>
Tue, 25 Oct 2011 04:27:47 +0000 (12:27 +0800)
committerChong Yidong <cyd@gnu.org>
Tue, 25 Oct 2011 04:27:47 +0000 (12:27 +0800)
Fixes: debbugs:6649
src/ChangeLog
src/sysdep.c

index 3f9b5beeab6feed428c5765e0f4b4492f3af6348..cee48bd1731a1cb63050c2082c37ea5a09cb42e9 100644 (file)
@@ -1,3 +1,8 @@
+2011-10-25  Enami Tsugutomo  <tsugutomo.enami@jp.sony.com>
+
+       * sysdep.c (init_sys_modes): Fix the check for the controlling
+       terminal (Bug#6649).
+
 2011-10-20  Eli Zaretskii  <eliz@gnu.org>
 
        * dispextern.h (struct bidi_it): New member next_en_type.
index b0d5a1abbe3fa5d51654275d3a18dfc8c551ba51..d666f8dbb79bf3d0e031542b4cdde5eb1d1232f7 100644 (file)
@@ -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.