diff options
| author | Karoly Lorentey | 2005-02-12 15:11:25 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-02-12 15:11:25 +0000 |
| commit | e72cf5ee9da4ae138feeb2512b58c5393c5c9251 (patch) | |
| tree | 6ec5eef03c5472292bb1dc8756e3c1dabe0c2ac7 /src | |
| parent | 7540c1e0ea7ac7767c96a69df330abd108a7247a (diff) | |
| download | emacs-e72cf5ee9da4ae138feeb2512b58c5393c5c9251.tar.gz emacs-e72cf5ee9da4ae138feeb2512b58c5393c5c9251.zip | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 5e0ffb14942..24dd7f12607 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -10307,9 +10307,9 @@ clear_waiting_for_input () | |||
| 10307 | 10307 | ||
| 10308 | /* The SIGINT handler. | 10308 | /* The SIGINT handler. |
| 10309 | 10309 | ||
| 10310 | If we have a frame on the controlling tty, the SIGINT was generated | 10310 | If we have a frame on the controlling tty, we assume that the |
| 10311 | by C-g, so we call handle_interrupt. Otherwise, the handler kills | 10311 | SIGINT was generated by C-g, so we call handle_interrupt. |
| 10312 | Emacs. */ | 10312 | Otherwise, the handler kills Emacs. */ |
| 10313 | 10313 | ||
| 10314 | static SIGTYPE | 10314 | static SIGTYPE |
| 10315 | interrupt_signal (signalnum) /* If we don't have an argument, */ | 10315 | interrupt_signal (signalnum) /* If we don't have an argument, */ |
| @@ -10326,6 +10326,8 @@ interrupt_signal (signalnum) /* If we don't have an argument, */ | |||
| 10326 | signal (SIGQUIT, interrupt_signal); | 10326 | signal (SIGQUIT, interrupt_signal); |
| 10327 | #endif /* USG */ | 10327 | #endif /* USG */ |
| 10328 | 10328 | ||
| 10329 | SIGNAL_THREAD_CHECK (signalnum); | ||
| 10330 | |||
| 10329 | /* See if we have an active display on our controlling terminal. */ | 10331 | /* See if we have an active display on our controlling terminal. */ |
| 10330 | display = get_named_tty_display (NULL); | 10332 | display = get_named_tty_display (NULL); |
| 10331 | if (!display) | 10333 | if (!display) |
| @@ -10365,14 +10367,15 @@ static void | |||
| 10365 | handle_interrupt () | 10367 | handle_interrupt () |
| 10366 | { | 10368 | { |
| 10367 | char c; | 10369 | char c; |
| 10368 | struct frame *sf = SELECTED_FRAME (); | ||
| 10369 | 10370 | ||
| 10370 | SIGNAL_THREAD_CHECK (signalnum); | ||
| 10371 | cancel_echoing (); | 10371 | cancel_echoing (); |
| 10372 | 10372 | ||
| 10373 | /* XXX This code needs to be revised for multi-tty support. */ | 10373 | /* XXX This code needs to be revised for multi-tty support. */ |
| 10374 | if (!NILP (Vquit_flag) | 10374 | if (!NILP (Vquit_flag) |
| 10375 | && (FRAME_TERMCAP_P (sf) || FRAME_MSDOS_P (sf))) | 10375 | #ifndef MSDOS |
| 10376 | && get_named_tty_display (NULL) | ||
| 10377 | #endif | ||
| 10378 | ) | ||
| 10376 | { | 10379 | { |
| 10377 | /* If SIGINT isn't blocked, don't let us be interrupted by | 10380 | /* If SIGINT isn't blocked, don't let us be interrupted by |
| 10378 | another SIGINT, it might be harmful due to non-reentrancy | 10381 | another SIGINT, it might be harmful due to non-reentrancy |