www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/13/14:11:58

Date: Wed, 13 Oct 1999 11:57:26 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Mohamed Saad <bazramit AT yahoo DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: exit() makes my program crash!!!!!
In-Reply-To: <19991012134544.29339.rocketmail@web107.yahoomail.com>
Message-ID: <Pine.SUN.3.91.991013115405.16702Q-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019