www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/13/15:28:23

From: "Tom Morton" <tmorton AT yikesstation DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: exit() makes my program crash!!!!!
Date: Wed, 13 Oct 1999 13:47:09 +0100
Organization: Yikes Station Ltd.
Lines: 47
Message-ID: <7u1u7r$57d$1@news6.svr.pol.co.uk>
References: <19991012134544 DOT 29339 DOT rocketmail AT web107 DOT yahoomail DOT com>
NNTP-Posting-Host: modem-73.adderall.dialup.pol.co.uk
X-Trace: news6.svr.pol.co.uk 939818043 5357 62.136.48.201 (13 Oct 1999 12:34:03 GMT)
NNTP-Posting-Date: 13 Oct 1999 12:34:03 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Mohamed Saad <bazramit AT yahoo DOT com> wrote in message
news:19991012134544 DOT 29339 DOT rocketmail AT web107 DOT yahoomail DOT com...
>
> Hello everyone,
>    how are you? hope every thing is allright!

Everything is EXCELLENT <cracks knuckles>
Heh heh heh!

>    well... here are some small questions!
>
>    1) a strange thing is happening! in a program of
> mine, i made an Exit button! when it is pressed, it
> simply calls... exit(1);
>    now... the problem is that when the button is
> pressed, my whole program freezes!! it does not
> respond to any thing! even ctrl-break does not work!
>    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!!)
>
>    now what does exit(1) do to freeze the program??
>
>    (Note: I have not hooked any interrupts!! the
> program is runnin in 640*480*65k colors... in case
> this helps!)
>
>  Please help me! I am so desperate!!!

Try this:

allegro_exit();
printf("Thanks for playing Foobar III, weak minded human!\n");
exit(0);

I'm not sure if it makes any difference whether exit is
exit(0) or exit(1) but it works. *shrug*


--
Yikes Station: The Best Frontier Elite 2 Website
http://www.yikesstation.freeserve.co.uk/frontier/yikes.htm

Tom 'Moretom' Morton


- Raw text -


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