exit codes (was: Identifier length?)
Stephen Uitti
suitti at haddock.ima.isc.com
Fri Mar 24 03:09:41 AEST 1989
->...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.
More information about the Comp.std.c
mailing list