What is an exit code for a process?
So imagine a trivial C program. See the C sandbox. We always have a int main() function and the program ends by returning an integer that we call the “exit code” for the process. It could be anything - nothing enforces what gets returned, for example:
int main(){
return 0; // This is the 'success' exit code for this process.
}
By convention returning 0 indicates the process was “successful”, but a programmer could pick anything.