# HG changeset patch # User Eli Zaretskii # Date 853420371 0 # Node ID 205ec6c5d8f3feab9aa7fe9144cdd4829ac85b96 # Parent 1efa81ac7e5ae05c00a602a9aab4b41f102cde25 * (interrupt_signal): Make emergency exit work on MSDOS frames. Block further SIGINTs while `interrupt_signal' runs. diff -r 1efa81ac7e5a -r 205ec6c5d8f3 src/keyboard.c --- a/src/keyboard.c Thu Jan 16 12:50:00 1997 +0000 +++ b/src/keyboard.c Thu Jan 16 13:12:51 1997 +0000 @@ -7462,11 +7462,17 @@ 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 @@ #endif /* not MSDOS */ fflush (stdout); init_sys_modes (); + sigfree (); } else {