what does exit(0) mean?
Guy Harris
guy at sun.uucp
Sun Feb 23 21:27:27 AEST 1986
> > 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 at sun.arpa (yes, really)
More information about the Comp.lang.c
mailing list