Date: Wed, 13 Oct 1999 11:57:26 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Mohamed Saad cc: djgpp AT delorie DOT com Subject: Re: exit() makes my program crash!!!!! In-Reply-To: <19991012134544.29339.rocketmail@web107.yahoomail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 12 Oct 1999, Mohamed Saad wrote: > i tried to replace exit(1) with abort() and it > exited with no problem (but i can't use it! because it > outputs the stack contents and stuff!!) What happens if you call _exit(1) instead of exit(1) ? > now what does exit(1) do to freeze the program?? The way to really understand this is to download the library sources, extract the source of the exit() function, and add some debugging print-outs there that will show where does it get stuck. Then post the offending code fragment from exit() here, and someone will help you figure it out. The most probable cause is some bug in your program, but the question is where is it? > (Note: I have not hooked any interrupts!! the > program is runnin in 640*480*65k colors... in case > this helps!) Did you use any libraries, like Allegro? If so, tell which ones you used, and what functions from there are you calling.