Abstract exit success/failure codes
Paul Backus
snarwin at gmail.com
Thu Dec 6 03:45:49 UTC 2018
On Thursday, 6 December 2018 at 03:14:24 UTC, Andrew Pennebaker
wrote:
> Most operating systems today use the convention of 0 =>
> success, non-zero => fail for exit codes, but not all. Might D
> offer a standard way to refer to a successful exit code vs. a
> failing exit code, to foster cross-platform programs out of the
> box? Some other languages already do this.
EXIT_FAILURE and EXIT_SUCCESS are defined in the D module
core.stdc.stdlib [1], which corresponds to the standard C header
stdlib.h.
The convention that 0 means the same thing as EXIT_SUCCESS is
part of the C standard [2], so it should be portable to any
platform that supports standard C.
[1] https://dlang.org/phobos/core_stdc_stdlib.html
[2] http://port70.net/~nsz/c/c89/c89-draft.html#4.10.4.3
More information about the Digitalmars-d
mailing list