www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/13/21:31:09

From: "Damian Yerrick" <web DOT poison AT pineight DOT 8m DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: exit() makes my program crash!!!!!
Date: Wed, 13 Oct 1999 16:16:08 -0500
Organization: Rose-Hulman Institute of Technology
Lines: 36
Message-ID: <7u2su8$nfo$1@solomon.cs.rose-hulman.edu>
References: <19991012134544 DOT 29339 DOT rocketmail AT web107 DOT yahoomail DOT com> <7u1u7r$57d$1 AT news6 DOT svr DOT pol DOT co DOT uk>
NNTP-Posting-Host: 137.112.205.146
X-Trace: solomon.cs.rose-hulman.edu 939849480 24056 137.112.205.146 (13 Oct 1999 21:18:00 GMT)
X-Complaints-To: news AT cs DOT rose-hulman DOT edu
NNTP-Posting-Date: 13 Oct 1999 21:18:00 GMT
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

Tom Morton <tmorton AT yikesstation DOT freeserve DOT co DOT uk> wrote:
>
> Mohamed Saad <bazramit AT yahoo DOT com> wrote:
> >
> >    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!
>8
> >    (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*

It's anything from exit(0) to exit(255) depending on what
you want the DOS ERRORLEVEL to be set to after your
program exits.


Damian Yerrick
http://come.to/yerrick


- Raw text -


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