4 ms·
One issue with that is that using 1 for success conflicts with the nearly universal Unix convention of using 0 for success. C requires exit(0) to indicate a su
by _kst_ 5y ago
One issue with that is that using 1 for success conflicts with the nearly universal Unix convention of using 0 for success.
C requires exit(0) to indicate a successful status. The OpenVMS C library translates that to a status of 1.
A lot of C code uses exit(1) to indicate failure, but it indicates success in OpenVMS. (Use EXIT_FAILURE, a macro defined in <stdlib.h>, instead.)
- zoomablemind 5y ago> ... Use EXIT_FAILURE, a macro defined in <stdlib.h> ...EXIT_SUCCESS too. This at least would provide a basic portability.