Mail Archives: djgpp-workers/1996/10/17/03:21:00
On Wed, 16 Oct 1996, John M. Aldrich wrote:
> > Isn't Ctrl-Break handled by BIOS and intercepted by DOS which is, in turn,
> > intercepted by our signal handler?
>
> As I recall, Ctrl-Break as handled by CWSDPMI completely kills the
> program, bypassing any signal handlers the program may have installed.
This is incorrect. Ctrl-Break winds up in the same signal handler as
Ctrl-C, and therefore also causes the program to exit with the same exit
code (unless you catch the signal, of course). It is true that these two
keystrokes are handled differently on a PC, but the DJGPP setup and the
signal handling machinery take care to tunnel them both into the same
place. The only difference in their handling in the default handler is
that Ctrl-Break causes a full stack trace to be printed, whereas Ctrl-C
doesn't, but that's a feature designed to allow you to abort a stray
program and know where did it go bananas.
- Raw text -