Message-ID: <32670863.22BE@cs.com> Date: Thu, 17 Oct 1996 21:32:35 -0700 From: "John M. Aldrich" Reply-To: fighteer AT cs DOT com Organization: Three pounds of chaos and a pinch of salt MIME-Version: 1.0 To: Eli Zaretskii CC: grendel AT ananke DOT amu DOT edu DOT pl, djgpp-workers AT delorie DOT com Subject: Re: Install thingy References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Eli Zaretskii wrote: > > 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. I tested this last night and I am happy to say that you and Charles (who emailed me privately) are right - Ctrl-Break is also handled as SIGINT. But an odd thing happened when I was testing: if I pressed Ctrl-C, the program exited instantly; while if I pressed Ctrl-Break, the system would wait for another keystroke before exiting. Is this an artifact of using the conio functions (cgets, getch) instead of stdio? As I recall, when SIGINT is not handled, both keystrokes cause immediate termination. FYI, it happened under both Windoze and CWSDPMI. BTW, is the fact that a generated SIGINT terminates ALL programs in an execution chain simultaneously unless one of them handles it a feature or a bug? Just curious... -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com | | Proud owner of what might one | http://www.cs.com/fighteer | | day be a spectacular MUD... | Plan: To make Bill Gates suffer | ---------------------------------------------------------------------