[petsc-users] Error and success codes

Jed Brown jed at jedbrown.org
Wed Aug 27 08:50:41 CDT 2014


Cedric Doucet <cedric.doucet at inria.fr> writes:
>> No, use 0.  It's less typing and that is something that will definitely
>> never change.
>
> I understand but it could be a good thing to give it the same value as
> EXIT_SUCCESS (from cstdlib) because this value is not always zero.

C11 §7.22.4.4 "If the value of status is zero or EXIT_SUCCESS, an
implementation-defined form of the status successful termination is
returned."

i.e., you can always exit(0) for success.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140827/04433eb7/attachment.pgp>


More information about the petsc-users mailing list