Skip to content

Instantly share code, notes, and snippets.

@dmyersturnbull
Created January 26, 2024 22:02
Show Gist options
  • Save dmyersturnbull/f62d910d3d80513e7c0c0ca78eb1943f to your computer and use it in GitHub Desktop.
Save dmyersturnbull/f62d910d3d80513e7c0c0ca78eb1943f to your computer and use it in GitHub Desktop.
Recommended Linux exit codes as Java constants
/**
* Recommended exit codes from {@code /usr/include/sysexits.h}.
*/
public final class ExitStatus {
public static final int OK = 0;
public static final int GENERIC_ERROR = 1;
public static final int BASE = 64;
public static final int USAGE = 64;
public static final int NO_DATA = 65;
public static final int NO_INPUT = 66;
public static final int NO_USER = 67;
public static final int NO_HOST = 68;
public static final int UNAVAILLABLE = 69;
public static final int SOFTWARE = 70;
public static final int OS_ERROR = 71;
public static final int OS_FILE = 72;
public static final int CAN_NOT_CREATE = 73;
public static final int IO_ERROR = 74;
public static final int TEMP_FAIL = 75;
public static final int PROTOCOL = 76;
public static final int NO_PERM = 77;
public static final int CONFIG = 78;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment