Mark McIntyre said:
On Wed, 29 Mar 2006 10:17:21 GMT, in comp.lang.c , Keith Thompson
No. According to the ISO Standard, they /must/ both mean "successful
termination status".
[...]
But possibly different forms of successful termination status.
C99 7.20.4.3p5:
If the value of status is zero or EXIT_SUCCESS, an
implementation-defined form of the status _successful termination_
is returned.
The wording is ambiguous. It could mean either:
Zero causes an implementation-defined form of successful
termination.
EXIT_SUCCESS causes an implementation-defined form of successful
termination.
(They needn't be the same form, as long as they both indicate
success.)
or:
Zero or EXIT_SUCCESS causes *the same* implementation-defined form
of successful termination.
I think the first interpretation is more reasonable (YMMV). Under
that interpretation, exit(0) and exit(EXIT_SUCCESS) could behave
differently, by causing two different forms of a successful
termination status to be returned to the host environment.
I'm arguing that an implementation is allowed to make exit(0) and
exit(EXIT_SUCCESS) behave differently (though the difference can't be
detected by the program), not that there's any point in doing so.