🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.c
Article #9505

Re: functions that don't return

#9505
From: Ray Butterworth
Date: Mon, 06 Oct 1986 13:16
12 lines
1280 bytes
> I think it should be the second choice, main(); exit(0);.  The reason
> is two fold.  First, unless a program specifically bombs off, it
> should exit with a happy status.  Falling off the bottom of main I
> would not consider to be doing anything specific yet the return (and
> exit) value will be random.  Second, with a random exit status, it
> makes the program much less usefull.  Make(1) will sometimes work and
> sometimes fail, etc.

If you change that to "main(); exit(1);" I'll agree with you.
Programs should definitely not exit with a random status,
but I think we should do as much as possible to encourage the programmer
to be aware that it is his responsibility to return a meaningful status.
Technical Details
Message-ID: <3511@watmath.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!caip!clyde!watmath!rbutterworth
References: <584@hadron.UUCP> <86900070@haddock> <1216@bunker.UUCP> <147@bobkat.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!caip!clyde!watmath!rbutterworth
From: rbutterworth@watmath.UUCP (Ray Butterworth)
Newsgroups: net.lang.c
Subject: Re: functions that don't return
Message-ID: <3511@watmath.UUCP>
Date: Mon, 6-Oct-86 09:16:49 EDT
Article-I.D.: watmath.3511
Posted: Mon Oct  6 09:16:49 1986
Date-Received: Wed, 8-Oct-86 00:26:05 EDT
References: <584@hadron.UUCP> <86900070@haddock> <1216@bunker.UUCP> <147@bobkat.UUCP>
Organization: U of Waterloo, Ontario
Lines: 12