Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: exit(-1) Message-ID: <6935@brl-smoke.ARPA> Date: 6 Jan 88 02:44:00 GMT References: <502@cresswell.quintus.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 13 In article <502@cresswell.quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: >Except where you are writing code for a specific system (say you >have #if cases for MVS, VMS, and UNIX) it seems like a good idea >to pass only 0 or 1 to exit(). VMS C would like for exit(1); to also mean "success", we were told, so the current proposed standard requires to define macros EXIT_FAILURE and EXIT_SUCCESS. Special dispensation was granted to the value 0, which also indicates success (the VMS C implementor agreed that he could make that work on his system). All other values of the exit status have implementation-defined meaning; they might contain system error codes, errno values, or some other stuff with non-portable meaning.