🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3240

Re: Must main return a value?

#3240
From: Paul Eggert
Date: Fri, 28 Jun 1991 18:06
14 lines
964 bytes
steve@taumet.com (Stephen Clamage) writes:

>michi@ptcburp.ptcbu.oz.au (Michael Henning) writes:
>>So it pays to write
>>int main(void) { exit(0); }

>Except that EXIT_SUCCESS need not have the value 0.  This might be
>wrong in an ANSI environment.

But section 4.10.4.3 says that exit(0) and exit(EXIT_SUCCESS) have the
same effect even if EXIT_SUCCESS!=0.

Anyway, Posix 1003.1-1990 (section 8.1) says that EXIT_SUCCESS==0,
so hosts where EXIT_SUCCESS!=0 are an endangered species.
Technical Details
Message-ID: <1991Jun28.180636.19856@twinsun.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucla-cs!twinsun!eggert
References: <7830001@hpwrce.HP.COM> <1991Jun28.043342.27540@ptcburp.ptcbu.oz.au> <787@taumet.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucla-cs!twinsun!eggert
From: eggert@twinsun.com (Paul Eggert)
Newsgroups: comp.std.c
Subject: Re: Must main return a value?
Message-ID: <1991Jun28.180636.19856@twinsun.com>
Date: 28 Jun 91 18:06:36 GMT
References: <7830001@hpwrce.HP.COM> <1991Jun28.043342.27540@ptcburp.ptcbu.oz.au> <787@taumet.com>
Sender: usenet@twinsun.com
Organization: Twin Sun, Inc
Lines: 14
Nntp-Posting-Host: ata