aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii <[email protected]>1997-01-16 13:12:51 +0000
committerEli Zaretskii <[email protected]>1997-01-16 13:12:51 +0000
commit31e4e97b5b01a2f37c1d3a4f6241d954dac34de4 (patch)
treead8b1cefbbf5a967f79743fcc25c03d7f44c9bd7 /src
parent417a04bb0406f9fb5f2bba9f294bf380de64fa41 (diff)
* (interrupt_signal): Make emergency exit work on MSDOS
frames. Block further SIGINTs while `interrupt_signal' runs.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index ebe32821a2..c0f46fbad1 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -7462,11 +7462,17 @@ interrupt_signal (signalnum) /* If we don't have an argument, */
cancel_echoing ();
- if (!NILP (Vquit_flag) && FRAME_TERMCAP_P (selected_frame))
+ if (!NILP (Vquit_flag)
+ && (FRAME_TERMCAP_P (selected_frame) || FRAME_MSDOS_P (selected_frame)))
{
+ /* If SIGINT isn't blocked, don't let us be interrupted by
+ another SIGINT, it might be harmful due to non-reentrancy
+ in I/O functions. */
+ sigblock (sigmask (SIGINT));
+
fflush (stdout);
reset_sys_modes ();
- sigfree ();
+
#ifdef SIGTSTP /* Support possible in later USG versions */
/*
* On systems which can suspend the current process and return to the original
@@ -7545,6 +7551,7 @@ interrupt_signal (signalnum) /* If we don't have an argument, */
#endif /* not MSDOS */
fflush (stdout);
init_sys_modes ();
+ sigfree ();
}
else
{