Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #120484
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Keith Thompson <kst-u@mib.org> |
| Newsgroups | comp.lang.c |
| Subject | Re: main's return rule |
| Date | Thu, 28 Sep 2017 12:43:44 -0700 |
| Organization | None to speak of |
| Lines | 20 |
| Message-ID | <lnbmluwqvj.fsf@kst-u.example.com> (permalink) |
| References | <97da835b-e7df-42b5-9cc5-4d7ca935b481@googlegroups.com> <59CD49ED.7030101@dignus.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Injection-Info | reader02.eternal-september.org; posting-host="f02d66d70d400004528cf8384483c39b"; logging-data="26054"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186khOSP7VGNcGhtVInpJb1" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
| Cancel-Lock | sha1:If99FrLpc6teD2FCm3WCHZYV00g= sha1:sA7zkLFMMaDfjmJOFUp9m7zIXNo= |
| Xref | csiph.com comp.lang.c:120484 |
Show key headers only | View raw
Thomas David Rivers <rivers@dignus.com> writes:
[...]
> Hence the C convention for the return code of main() - 0 is "good",
> non-zero is "not as good".
[...]
That's not a convention that's defined by the C standard, and there
are systems that follow different conventions. C requires that
returning 0 or EXIT_SUCCESS denotes success, returning EXIT_FAILURE
denotes failure, and returning any other value has an unspecified
meaning.
Unix-like systems do follow the "zero good, non-zero bad" convenion.
I think MS Windows does too. OpenVMS, for example, does not.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
main's return rule fir <profesor.fir@gmail.com> - 2017-09-28 09:49 -0700
Re: main's return rule fir <profesor.fir@gmail.com> - 2017-09-28 10:04 -0700
Re: main's return rule fir <profesor.fir@gmail.com> - 2017-09-28 10:09 -0700
Re: main's return rule fir <profesor.fir@gmail.com> - 2017-09-28 11:10 -0700
Re: main's return rule Thomas David Rivers <rivers@dignus.com> - 2017-09-28 15:13 -0400
Re: main's return rule Keith Thompson <kst-u@mib.org> - 2017-09-28 12:43 -0700
Re: main's return rule Thomas David Rivers <rivers@dignus.com> - 2017-10-02 10:12 -0400
Re: main's return rule herrmannsfeldt@gmail.com - 2017-12-10 13:54 -0800
Re: main's return rule Keith Thompson <kst-u@mib.org> - 2017-12-10 14:39 -0800
Re: main's return rule herrmannsfeldt@gmail.com - 2017-12-13 05:01 -0800
Re: main's return rule Keith Thompson <kst-u@mib.org> - 2017-12-13 09:17 -0800
Re: main's return rule scott@slp53.sl.home (Scott Lurndal) - 2017-12-13 18:31 +0000
Re: main's return rule herrmannsfeldt@gmail.com - 2017-12-14 11:51 -0800
Re: main's return rule Manfred <noname@invalid.add> - 2017-12-13 20:36 +0100
Re: main's return rule "James R. Kuyper" <jameskuyper@verizon.net> - 2017-12-13 15:14 -0500
Re: main's return rule supercat@casperkitty.com - 2017-12-14 07:47 -0800
Re: main's return rule Manfred <noname@invalid.add> - 2017-12-14 20:18 +0100
Re: main's return rule fir <profesor.fir@gmail.com> - 2017-09-29 07:50 -0700
Re: main's return rule Chad <cdalten@gmail.com> - 2017-09-29 08:14 -0700
Re: main's return rule gordonb.3z6ou@burditt.org (Gordon Burditt) - 2017-09-29 13:01 -0500
csiph-web