Fast code and no morals
Chris Torek
chris at umcp-cs.UUCP
Thu Feb 20 01:13:26 AEST 1986
In article <1015 at brl-smoke.ARPA> lars at acc.arpa writes:
>> If VMS does not support exit(0) as successful termination,
>> then VMS is WRONG and needs to fix their exit() routine.
>> Doug Gwyn (VLD/VMB) <gwyn at BRL.ARPA>
>The common semantics seem to me to be "return to the surrounding
>operating system level, using the argument value as the return code".
This is arguably valid; but I argue that a better definition is
`quit this program; argument == 0 implies success, anything else
implies failure'. This is *not* part of the `K&R bible'; it simply
is a good idea given the large existing body of Unix C code that
makes that assumption.
>Does the ANSI draft specify semantics for system calls ?
No, but it does specify semantics for exit(). Who ever said exit()
was a system call? (And in fact, it is not a system call in any
`current' Unix: it is a stdio routine. The system call is _exit().)
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1415)
UUCP: seismo!umcp-cs!chris
CSNet: chris at umcp-cs ARPA: chris at mimsy.umd.edu
More information about the Comp.lang.c
mailing list