I need to decide which exit code to exit() with in different scenarios. I just read
Are there any standard exit status codes in Linux?
but I need to write something that is (sort of) cross-platform Linux+Windows. MS Windows does not seem to have something like /usr/include/sysexits.h
; it only has C89's stdlib.h
, which provides
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
So are these two the only thing that's portable? Or does Windows have some more elaborate platform-standard exit codes?
Note: I don't mean the System Error Codes of course.