www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/09/15/12:48:52

Date: Sun, 15 Sep 1996 12:41:59 -0400
From: dj (DJ Delorie)
Message-Id: <199609151641.MAA16582@delorie.com>
To: svincent AT cs DOT sonoma DOT edu
CC: max AT alcyone DOT com, djgpp AT delorie DOT com
In-reply-to: <Pine.GSO.3.94.960914201304.18443A-100000@zippy> (message from Samuel Vincent on Sat, 14 Sep 1996 20:14:46 -0700 (PDT))
Subject: Re: Binary files and ^C chars-try again

> > There's nothing wrong with using exit to terminate a program, even if you're
> > in main.
> 
> Well, sure there's nothing wrong with it...  But it performs frivolous
> fflush's and other things when all you want to do is end the program right
> there.  Why call another function when all you want is to end the program?
> ;)

When you return from main, the runtime calls exit() anyway.  If you
want to leave the program *without* doing cleanup, use _exit()
explicitely.

- Raw text -


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