Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!linus!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.lang.c Subject: Re: what does exit(0) mean? Message-ID: <3281@sun.uucp> Date: Sun, 23-Feb-86 06:27:27 EST Article-I.D.: sun.3281 Posted: Sun Feb 23 06:27:27 1986 Date-Received: Wed, 26-Feb-86 04:26:49 EST References: <1113@brl-smoke.ARPA> <5020@alice.uUCp> Organization: Sun Microsystems, Inc. Lines: 14 > > The point is that the VMS C implementation must map its exit codes into > > what the operating system expects. When the programmer says `exit 0', he > > means `I succeeded'. The exit() function must support this. > > No way! exit(n) means "terminate and send the number n back to the system." In UNIX C, definitely. In ANSI C (as given in the current draft), no way. Chapter and verse citations have been given in previous articles. A VMS ANSI C implementaion will return SS$NORMAL or whatever they call it when you do "exit(0)". Presumably, "exit(n)", for "n" != 0, can return with "n". -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.arpa (yes, really)