# HG changeset patch # User Karoly Lorentey # Date 1108221085 0 # Node ID 6e0f153725abd0bbe4e433f34a0ea44a24cf8820 # Parent de637975e99a3025e1f1a738ee869e7f1f82c4e1 Fix compilation error with GTK, fix issues with double C-g on controlling tty. (Reported by Friedrich Delgado Friedrichs, Yoshiaki Kasahara.) * src/keyboard.c (interrupt_signal, handle_interrupt): Move thread check to interrupt_signal. Check for frame on controlling tty instead of current selected frame in handle_interrupt. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-292 diff -r de637975e99a -r 6e0f153725ab src/keyboard.c --- a/src/keyboard.c Thu Feb 10 21:23:33 2005 +0000 +++ b/src/keyboard.c Sat Feb 12 15:11:25 2005 +0000 @@ -10307,9 +10307,9 @@ /* The SIGINT handler. - If we have a frame on the controlling tty, the SIGINT was generated - by C-g, so we call handle_interrupt. Otherwise, the handler kills - Emacs. */ + If we have a frame on the controlling tty, we assume that the + SIGINT was generated by C-g, so we call handle_interrupt. + Otherwise, the handler kills Emacs. */ static SIGTYPE interrupt_signal (signalnum) /* If we don't have an argument, */ @@ -10326,6 +10326,8 @@ signal (SIGQUIT, interrupt_signal); #endif /* USG */ + SIGNAL_THREAD_CHECK (signalnum); + /* See if we have an active display on our controlling terminal. */ display = get_named_tty_display (NULL); if (!display) @@ -10365,14 +10367,15 @@ handle_interrupt () { char c; - struct frame *sf = SELECTED_FRAME (); - - SIGNAL_THREAD_CHECK (signalnum); + cancel_echoing (); /* XXX This code needs to be revised for multi-tty support. */ if (!NILP (Vquit_flag) - && (FRAME_TERMCAP_P (sf) || FRAME_MSDOS_P (sf))) +#ifndef MSDOS + && get_named_tty_display (NULL) +#endif + ) { /* If SIGINT isn't blocked, don't let us be interrupted by another SIGINT, it might be harmful due to non-reentrancy