From mboxrd@z Thu Jan 1 00:00:00 1970 From: dmr@plan9.bell-labs.com To: 9fans@cse.psu.edu Subject: Re: [9fans] the declaration of main() MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20010423193320.E424619A70@mail.cse.psu.edu> Date: Mon, 23 Apr 2001 15:33:19 -0400 Topicbox-Message-UUID: 8ca13c00-eac9-11e9-9e20-41e7f4b1d025 Forsyth said, > although it was possible to return a status from main by 6th edition > (in 5th edition returning from main did exit(0)), and only su included > return from main, arguably wrongly in 5th edition and definitely so in > 6th. when i looked recently, i could find only two commands using it > in 7th edition (makekey and graph, both returning 0). 5th and 6th did behave as Charles says. The real difference between them and the 7th was that almost no use was made of status returns, (either exit() or return value of main), in the earlier ones. Many things just flowed off the end of main. Between 6th and 7th, most things were fixed, in part because Bourne installed a version of his shell that announced every non-zero termination. Also things like make arrived, and non-zero returns began to be treated more often as errors. Dennis