Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!decvax!ima!haddock!suitti From: suitti@haddock.ima.isc.com (Stephen Uitti) Newsgroups: comp.std.c Subject: Re: exit codes (was: Identifier length?) Message-ID: <12143@haddock.ima.isc.com> Date: 23 Mar 89 17:09:41 GMT References: <627@maxim.ERBE.SE> <1989Mar16.171213.21210@utzoo.uucp> <6161@bsu-cs.UUCP> <1989Mar17.175939.1226@utzoo.uucp> <6212@bsu-cs.UUCP> <12111@haddock.ima.isc.com> <6268@bsu-cs.UUCP> <9902@smoke.BRL.MIL> <6272@bsu-cs.UUCP> Reply-To: suitti@haddock.ima.isc.com (Stephen Uitti) Organization: Interactive Systems, Boston Lines: 21 ->...most existing C programs exit with a code of 0, 1, or 2 and that ->0=success, nonzero=failure is a common convention): What does "2" commonly mean? "Other kind of error?" I use "0" and "1". I don't use shell scripts much, since C is a much better language (faster, more powerful, easier to support, etc.). Generally, the exit code is irrelevant. I use "0" & "1" mostly to keep "make" happy. ->Scanning through C programming textbooks, which are geared towards a ->variety of implementations not all under UNIX, we consistently find ->exit(0) and exit(1) used for success and failure respectively. ->It doesn't matter that these existing programs are "nonportable", if ->that means (as it does in this case) "won't work under VAX/VMS". What doesn't work? Does the program not compile or die? Does VMS support (or not) exit codes for DCL or something? Will this be fixed if/when DEC provides POSIX support for VMS? Stephen.