Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!sri-unix!quintus!ok From: ok@quintus.UUCP (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: VMS and exit(); Message-ID: <606@cresswell.quintus.UUCP> Date: 30 Jan 88 01:39:40 GMT References: <11537@brl-adm.ARPA> Organization: Quintus Computer Systems, Mountain View, CA Lines: 22 There *is* a vmsexit(). It is called SYS$EXIT, and is described in the System Services Manual (page SYS-152 in our copy). A VMS error code contains a severity code (bottom 3 bits, 0 = warning, 1 = success,) a subsystem code (RMS? SYS? DCL? FTN? and so on) the error code should-this-be-printed? and something else which I don't remember. Given that SYS$EXIT() exists, there is no reason why exit() couldn't be this way: void exit(n) int n; { n &= 255; C-library-shut-down; SYS$EXIT(n == 0 ? 1 : {severity = 2, subsystem = C, error code = n, don't print}); } This would manage to be consistent with both UNIX and VMS. So I can't believe that EXIT_SUCCESS and EXIT_FAILURE were invented for DEC's sake.