Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!gatech!seismo!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.lang.c Subject: Re: Fast code and no morals Message-ID: <3271@umcp-cs.UUCP> Date: Wed, 19-Feb-86 10:13:26 EST Article-I.D.: umcp-cs.3271 Posted: Wed Feb 19 10:13:26 1986 Date-Received: Fri, 21-Feb-86 06:00:18 EST References: <1015@brl-smoke.ARPA> Organization: U of Maryland, Computer Science Dept., College Park, MD Lines: 24 In article <1015@brl-smoke.ARPA> lars@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) >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@umcp-cs ARPA: chris@mimsy.umd.edu