Mercurial > hg > xemacs-beta
comparison src/signal.c @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | de805c49cfc1 |
children |
comparison
equal
deleted
inserted
replaced
411:12e008d41344 | 412:697ef44129c6 |
---|---|
29 #include "frame.h" | 29 #include "frame.h" |
30 #include "sysdep.h" | 30 #include "sysdep.h" |
31 #include "syssignal.h" | 31 #include "syssignal.h" |
32 #include "systime.h" | 32 #include "systime.h" |
33 | 33 |
34 #include "sysfile.h" | 34 #ifdef HAVE_UNISTD_H |
35 #include <unistd.h> | |
36 #endif | |
37 #include <errno.h> | |
35 | 38 |
36 /* Set to 1 when a quit-check signal (either a SIGIO interrupt or | 39 /* Set to 1 when a quit-check signal (either a SIGIO interrupt or |
37 the asynch. timeout for poll-for-quit) occurs. The QUITP | 40 the asynch. timeout for poll-for-quit) occurs. The QUITP |
38 macro may look at this. */ | 41 macro may look at this. */ |
39 volatile int quit_check_signal_happened; | 42 volatile int quit_check_signal_happened; |
175 Do NOT set alarm_happened, because we don't want anyone | 178 Do NOT set alarm_happened, because we don't want anyone |
176 looking at the timeout queue. We didn't set it and | 179 looking at the timeout queue. We didn't set it and |
177 it needs to stay the way it is. */ | 180 it needs to stay the way it is. */ |
178 quit_check_signal_happened = 1; | 181 quit_check_signal_happened = 1; |
179 | 182 |
180 #ifdef WIN32_NATIVE | 183 #ifdef WINDOWSNT |
181 can_break_system_calls = 0; | 184 can_break_system_calls = 0; |
182 #else | 185 #else |
183 /* can_break_system_calls is set when we want to break out of | 186 /* can_break_system_calls is set when we want to break out of |
184 non-interruptible system calls. */ | 187 non-interruptible system calls. */ |
185 if (can_break_system_calls) | 188 if (can_break_system_calls) |
415 to the original shell, ever. */ | 418 to the original shell, ever. */ |
416 stdout_out ("No support for stopping a process on this operating system;\n"); | 419 stdout_out ("No support for stopping a process on this operating system;\n"); |
417 stdout_out ("you can continue or abort.\n"); | 420 stdout_out ("you can continue or abort.\n"); |
418 #endif /* not SIGTSTP */ | 421 #endif /* not SIGTSTP */ |
419 stdout_out ("Auto-save? (y or n) "); | 422 stdout_out ("Auto-save? (y or n) "); |
423 fflush (stdout); | |
420 if (((c = getc (stdin)) & ~040) == 'Y') | 424 if (((c = getc (stdin)) & ~040) == 'Y') |
421 Fdo_auto_save (Qnil, Qnil); | 425 Fdo_auto_save (Qnil, Qnil); |
422 while (c != '\n') | 426 while (c != '\n') |
423 c = getc (stdin); | 427 c = getc (stdin); |
424 stdout_out ("Abort (and dump core)? (y or n) "); | 428 stdout_out ("Abort (and dump core)? (y or n) "); |
429 fflush (stdout); | |
425 if (((c = getc (stdin)) & ~040) == 'Y') | 430 if (((c = getc (stdin)) & ~040) == 'Y') |
426 abort (); | 431 abort (); |
427 while (c != '\n') | 432 while (c != '\n') |
428 c = getc (stdin); | 433 c = getc (stdin); |
429 stdout_out ("Continuing...\n"); | 434 stdout_out ("Continuing...\n"); |
435 fflush (stdout); | |
430 reinit_initial_console (); | 436 reinit_initial_console (); |
431 MARK_FRAME_CHANGED (XFRAME (DEVICE_SELECTED_FRAME | 437 MARK_FRAME_CHANGED (XFRAME (DEVICE_SELECTED_FRAME |
432 (XDEVICE (CONSOLE_SELECTED_DEVICE | 438 (XDEVICE (CONSOLE_SELECTED_DEVICE |
433 (XCONSOLE | 439 (XCONSOLE |
434 (Vcontrolling_terminal)))))); | 440 (Vcontrolling_terminal)))))); |