Must main return a value?

Steve Emmerson steve at groucho.ucar.edu
Sat Jun 29 13:40:09 AEST 1991


In <16577 at smoke.brl.mil> gwyn at smoke.brl.mil (Doug Gwyn) writes:

>In article <787 at taumet.com> steve at taumet.com (Stephen Clamage) writes:
>>Except that EXIT_SUCCESS need not have the value 0.  This might be
>>wrong in an ANSI environment.

>No -- while it is true that EXIT_SUCCESS might be defined as a nonzero value,
>a conforming hosted implementation must also support the exit status value 0
>as a "separate but equal" way to specify successful termination status.

In a POSIX environment, at least, EXIT_SUCCESS *is* 0.  Period.

Are there non-POSIX (or pre-POSIX) environments in which EXIT_SUCCESS is
(or was) not zero (I know about VMS)?

Steve Emmerson        steve at unidata.ucar.edu        ...!ncar!unidata!steve



More information about the Comp.std.c mailing list