exit codes (was: Identifier length?)

Larry Jones scjones at sdrc.UUCP
Thu Mar 23 08:17:59 AEST 1989


In article <6268 at bsu-cs.UUCP>, dhesi at bsu-cs.UUCP (Rahul Dhesi) writes:
> Existing programs almost never use anything other than a return code of
> 0, 1, or 2.  It almost doesn't matter what the standard says about the
> number of bits used.  In fact the standard could simply have said:
> "...if the value of the exit code is not 0, 1, or 2, it is interpreted
> in an implementation-dependent manner".  That would not affect more
> than about 0.2% of existing C programs.  The current standard affects
> all of them.

No, Rahul, it doesn't affect all of them.  Those of us who have
been writing REALLY portable code have been using exit(SUCCESS)
and exit(FAILURE) all along.

----
Larry Jones                         UUCP: uunet!sdrc!scjones
SDRC                                      scjones at sdrc.UU.NET
2000 Eastman Dr.                    BIX:  ltl
Milford, OH  45150                  AT&T: (513) 576-2070
"When all else fails, read the directions."



More information about the Comp.std.c mailing list