1 /* Handling asynchronous signals.
2 Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
3 Copyright (C) 1995, 1996 Ben Wing.
5 This file is part of SXEmacs
7 SXEmacs is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 SXEmacs is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 /* Synched up with: Not synched with FSF. Split out of keyboard.c. */
26 #include "ui/console.h"
27 #include "events/events.h" /* for signal_fake_event() */
30 #include "syssignal.h"
35 /* Set to 1 when a quit-check signal (either a SIGIO interrupt or
36 the asynch. timeout for poll-for-quit) occurs. The QUITP
37 macro may look at this. */
38 volatile int quit_check_signal_happened;
40 /* Count of the number of times a quit-check signal has occurred.
41 Some stuff in event-Xt.c looks at this. */
42 volatile int quit_check_signal_tick_count;
44 /* Set to 1 when a SIGINT (or SIGQUIT) interrupt is processed.
45 maybe_read_quit_event() looks at this. */
46 volatile int sigint_happened;
48 /* Set to 1 when an asynch. timeout signal occurs. */
49 static volatile int alarm_happened;
51 /* This is used to synchronize setting the waiting_for_user_input_p
53 static volatile int alarm_happened_while_emacs_was_blocking;
55 /* See check_quit() for when this is set. */
56 int dont_check_for_quit;
58 #if !defined (SIGIO) && !defined (DONT_POLL_FOR_QUIT)