As I don't have enough rep to comment (and my edit got rejected), adding this as an answer instead.
Various answers (e.g. Schof, David, Daniel Schuler) and comments suggest using or following sysexits.h
. I'd like to note that this has since been deprecated and its usage is discouraged, by at least FreeBSD and OpenBSD. (NetBSD hasn't done so but their last change to at least the manual comes from 2010 so they may just haven't looked at it since other BSDs deprecated it, or have a different opinion.)
As the file in Linux also comes from BSD (and doesn't seem to have had an actual update this century) I'd recommend following this advice.