Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!caip!clyde!cuae2!ltuxa!we53!sw013b!dj3b1!killer!ndmce!pollux!bobkat!pedz From: pedz@bobkat.UUCP (Pedz Thing) Newsgroups: net.lang.c Subject: Re: functions that don't return Message-ID: <147@bobkat.UUCP> Date: Fri, 3-Oct-86 11:50:59 EDT Article-I.D.: bobkat.147 Posted: Fri Oct 3 11:50:59 1986 Date-Received: Mon, 6-Oct-86 18:37:24 EDT References: <584@hadron.UUCP> <86900070@haddock> <1216@bunker.UUCP> Reply-To: pedz@bobkat.UUCP (Pedz Thing) Organization: Digital Lynx; Dallas, TX Lines: 17 In article <1216@bunker.UUCP> garys@bunker.UUCP (Gary M. Samuelson) writes: >In article <86900070@haddock> karl@haddock writes: >>There are three possible models for the crt0/main interface: main() could be >>int ("exit(main())"), void ("main(); exit(0)"), or dead ("main(); HALT"). 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. -- Perry Smith ctvax ---\ megamax --- bobkat!pedz pollux---/