Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!imagen!qubix!wjvax!brett From: brett@wjvax.UUCP (Brett Galloway) Newsgroups: comp.lang.c Subject: Re: exit(-1) Message-ID: <1185@wjvax.UUCP> Date: 11 Jan 88 01:26:46 GMT References: <502@cresswell.quintus.UUCP> <6935@brl-smoke.ARPA> <1179@wjvax.UUCP> <6983@brl-smoke.ARPA> Reply-To: brett@wjvax.UUCP (Brett Galloway) Organization: Watkins-Johnson Co., San Jose, Calif. Lines: 44 In article <6983@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >In article <1179@wjvax.UUCP> brett@wjvax.UUCP I wrote: >>However, it is hard to conceive an implementation >>which has multiple exit-success values. >VMS does! >I agree that probably all implementations, including VMS, will > #define EXIT_SUCCESS 0 I overstated. I even have applications which have multiple exit-success values. However, there was always one fundamental exit-success value. I feel that 0 is the best choice for this. >>Instead of accommodating VMS's stupid choice of exit values, why not require >>an ANSI-conforming VMS C compiler to swap 0 and 1 in the exit() in its C >>library? >We tried that, but many existing VMS applications have been passing >the value of 1 (disguised as SYS$SUCCESS or something like that) to >exit() to indicate success. Not to beat a dead horse, but that's why I suggested swapping 0 and 1 in exit() *and* simultaneously re-defining SYS$SUCCESS et al in the relevant header file(s). As I noted, this would break only unlinked binaries that were not re-compiled. I had said: - The only time that there would be a problem would be a re-link without a - re-compile. Frankly, anybody that would not re-compile across a transition - to an ANSI-conformant compiler deserves what they get. One E-mail respondent took exception to my tone (deservedly, I believe). However, I stand by my point. It is unlikely that unlinked binaries will survive across the transition to an ANSI C library. >>This is apt, since VMS caused the problem in the first place. >Actually, I agree with this, but since we found a solution that the >VMS folk could live with, why not stick with it. Of course the VMS folk could live with the ANSI C solution; it *is* effectively the VMS solution. It is a trivial matter for VMS to adapt to this solution. -- ------------- Brett D. Galloway {ac6,calma,cerebus,isi,isieng,pyramid,tymix}!wjvax!brett