[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: incorrect return code on vms...
From: |
Donald Sharp |
Subject: |
Re: incorrect return code on vms... |
Date: |
Fri, 1 Dec 2000 12:41:40 -0500 |
User-agent: |
Mutt/1.2.4i |
Ok.....( The patch'es purpose wasn't to return anything but success
or failure ).
I still think that EXIT_SUCCESS should be used instead of '0'
in this situation.
donald
On Fri, Dec 01, 2000 at 12:07:19PM -0500, Larry Jones wrote:
> 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