Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: 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 > 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.