Message-ID: <35560142.F922281E@erols.com> Date: Sun, 10 May 1998 15:34:26 -0400 From: Dan Chak MIME-Version: 1.0 To: Eli Zaretskii CC: DJGPP Subject: Re: CTRL-C runs an infinite loop References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Eli Zaretskii wrote: > > On Sun, 10 May 1998, Dan Chak wrote: > > > I'm having some strange behavior with DJGPP where when I hit Control-C > > to break out of my program, I get an infinite loop of the following, > > instead of being returned to the dos prompt. > > One possibility is that you are overflowing the stack, or otherwise > overwriting it. > > But for a better answer, please run your program with stderr redirected > to a file, and post here the beginning of this infinite loop of crashes. > The first two tracebacks hold the important clues about why does it > crash, the rest are just the usual DOS/Windows madness. > This might sound a little silly, but how does one redirect stderr? I've never really used it. Do I just open a file and reassign it stderr to that new file? I assume it's stderr is pointer to a buffer? > Telling a bit about what does your program do might also be useful to > guess what might go wrong. Well, it's just a blackjack game that I'm writing with Allegro. However, as you suggested, I probably am overwriting the stack by accident somewhere. I know through testing the program that something in my code is overwriting memory it shouldn't be touching and causing eroneous results. This is probably just another aberration stemming from the same problem. Dan /'^'\ ( o o ) --------------------------------------------------oOOO--(_)--OOOo-- Daniel Chak chakster AT geocities DOT com http://members.xoom.com/chakster .oooO ( ) Oooo. ----------------------------------------------------\ (----( )--- \_) ) / (_/