From: wemccaug AT prairienet DOT org (Wendy E. McCaughrin) Newsgroups: comp.os.msdos.djgpp Subject: Re: exit() makes my program crash!!!! (FINAL comment) References: <38085807 DOT 0 AT news DOT uni-bielefeld DOT de> <19991016090802 DOT 4896 DOT rocketmail AT web115 DOT yahoomail DOT com> Lines: 29 Message-ID: Date: Sat, 16 Oct 1999 22:53:13 GMT NNTP-Posting-Host: 192.17.3.4 X-Complaints-To: newsmgr AT prairienet DOT org X-Trace: firefly 940114393 192.17.3.4 (Sat, 16 Oct 1999 17:53:13 CDT) NNTP-Posting-Date: Sat, 16 Oct 1999 17:53:13 CDT Organization: Prairienet -- Your Community Network for East Central Illinois To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In a previous article, manni DOT heumann AT gmx DOT de (Manni Heumann) says: >In article <19991016090802 DOT 4896 DOT rocketmail AT web115 DOT yahoomail DOT com>, djgpp AT delorie DOT com wrote: >> >>Hello everyone, >> how are u? fine?? good! :) >> >> well... regarding my previous problem (exit() causes >>my prog to freeze..) here is the last comment! >> >> i have discovered that the program does NOT freeze! >>the program has actually finished! but screen did not >>return to text mode!! i became sure of this, as, after >>the program freezed, i just typed 'exit' and i simply >>returned back to windows! >> This simply means that exit() does NOT always return >>back to text mode by itself! i HAVE to put the >>following line: >> screen.settext(); >>before ANY call to exit!! >> >> is this considered a bug in exit()??? or this is >>normal?? >> No, it is not a bug, but you might consider using atexit() to register a function that will restore text-mode (and perhaps other cleanups), without having to do so in your main().