*BSD News Article 74768


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.mel.connect.com.au!news.mira.net.au!inquo!in-news.erinet.com!newsfeeder.sdsu.edu!news.sgi.com!swrinde!howland.reston.ans.net!Germany.EU.net!Dortmund.Germany.EU.net!interface-business.de!usenet
From: j@ida.interface-business.de (J Wunsch)
Newsgroups: comp.unix.bsd.bsdi.misc
Subject: Re: C Programming Help
Date: 26 Jul 1996 09:17:50 GMT
Organization: interface business GmbH, Dresden
Lines: 14
Message-ID: <4ta2fu$jj4@innocence.interface-business.de>
References: <Edina1996Jul23.202436.23721@news3.idirect.com.compulink.com>
  <Pine.BSI.3.93.960724124328.254f-100000@babel.magic.fr>
Reply-To: joerg_wunsch@interface-business.de (Joerg Wunsch)
NNTP-Posting-Host: ida.interface-business.de
X-Newsreader: knews 0.9.6
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E

Edouard CORREIA <ded@magic.fr> wrote:

> implicit exit does not flush any pending output so correct your program in
> this way:

That's wrong.  Falling off the end of main() is effectively identical
to calling exit(3), which flushes all buffers.

What you're thinking of is a call to _exit(2), or a death by signal.

-- 
J"org Wunsch					       Unix support engineer
joerg_wunsch@interface-business.de       http://www.interface-business.de/~j