[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: incorrect return code on vms...
From: |
Larry Jones |
Subject: |
Re: incorrect return code on vms... |
Date: |
Fri, 1 Dec 2000 12:07:19 -0500 (EST) |
Donald Sharp writes:
>
> You missunderstand what I did. This has nothing to do
> with the c compiler. It has everything to do with what
> cvs returned as a exit code. The vms system( according to
> the ChangeLog ) interprets return codes from programs as follows:
> 0 - Program failed
> 1 - Program Succeeded.
That is ancient history and does not conform to the ANSI/ISO C standard
which requires that 0 be interpreted as a successful exit status. The
VMS C run-time library was fixed long ago to do so, so no changes are
necessary. According to ANSI/ISO C, the only portable exit statuses are
0 or EXIT_SUCCESS (which are interpreted as success), and EXIT_FAILURE
(which is interpreted as failure). Trying to return different flavors
of success or failure, particularly using hard-coded values like 1 and
2, is non-portable and doomed to failure.
-Larry Jones
Don't you hate it when your boogers freeze? -- Calvin