Date: Sun, 20 Feb 2000 11:18:47 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Shawn Hargreaves cc: djgpp AT delorie DOT com Subject: Re: unload_datafile( ) freezes - please help :( In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, 18 Feb 2000, Shawn Hargreaves wrote: > The Allegro handler doesn't kill the program in response to ctrl+c > (that wouldn't be desirable for a majority of game/graphics type > applications), but it does have an emergency exit combo, ctrl+alt+del > or ctrl+alt+end, which is mapped onto the same thing (calls > __djgpp_hw_exception with %al = 0x79), which causes libc to print > the message about ctrl+c being pressed. It would be better to simulate Ctrl-BREAK, not Ctrl-C, at least for one of the two combinations. The ability to generate a full traceback is a valuable feature. > I presume this would be hooked in the same way as calling > the ctrl+c handler, just with a different code? Yes, the code is (surprise!) 0x1b, the number of the interrupt generated by Ctrl-BREAK. See src/libc/go32/dpmiexcp.c in the library sources. You could also use 0x7a, which will trigger SIGQUIT, but you'd need to enable SIGQUIT first, since it is disabled by default. See the docs of the function `__djgpp_traceback_exit', for the gory details. As yet another alternative, you could simply call `abort', which will also print a traceback.