ANSI C -- miscellaneous suggestions

Joe Mueller joemu at nscpdc.NSC.COM
Thu Dec 18 04:40:25 AEST 1986


In article <1171 at ucbcad.BERKELEY.EDU>, faustus at ucbcad.BERKELEY.EDU (Wayne A. Christopher) writes:
> Regarding the requirement that exit(0) be success -- this will break a lot
> of VMS C programs, which use 1 for success and 0 for "undefined error"
> (I think -- I'm not a big VMS fan...)


The question of exit status came up again during the last meeting. The position
the committee eventually adopted is this:

exit(0) always indicates success (for unix code)
exit(EXIT_SUCCESS) always indicates success
exit(EXIT_FAILURE) always indicates failure
exit(anything else) implementation defined

The EXIT* macros will be defined in (I believe) stddefs.h.

							Joe Mueller
							...!nsc!nscpdc!joemu



More information about the Comp.lang.c mailing list