Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: EXIT_SUCCESS Date: Sun, 10 Jul 2016 17:00:06 -0700 Organization: None to speak of Lines: 35 Message-ID: References: <87r3b4xdsa.fsf@gmail.com> <87shvk3sq9.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="16271"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19B/ShSvkjIIwYSiRfV6Jaf" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:huzJiZrZ7mh0CJyIHS/Y9v65bVc= sha1:RP6tEL9eE7CTf/UWTECvYlNbHa0= Xref: csiph.com comp.lang.c:90188 "Osmium" writes: > "Keith Thompson" wrote in message > news:lnoa65ksi8.fsf@kst-u.example.com... >> "Osmium" writes: >>> "Ben Bacarisse" wrote: >> [...] >>>> #include >>>> int main(void) { return EXIT_FAILURE; } >>> >>> Doesn't that depend on a distorted definition of the English word, >>> failure? >>> ISTM that the syntax is OK but the semantics are awful. >> >> EXIT_SUCCESS and EXIT_FAILURE >> >> expand to integer constant expressions that can be used as >> the argument to the exit function to return unsuccessful >> or successful termination status, respectively, to the host >> environment >> >> What distortion do you see? > > The program was successful and did what it was designed to do and returned > status indicating that it had failed. Yes. I see that it's a bit odd, but it's quite useful (see /bin/false on Unix). > If I misunderstood something, then I misunderstood something; so be it. -- Keith Thompson (The_Other_Keith) kst-u@mib.org 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"