/
What is an exit code for a process?
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.
, multiple selections available,
Related content
Standard in, standard error and standard output redirection
Standard in, standard error and standard output redirection
More like this
I thought popen does not give us the exit code of the process it ran
I thought popen does not give us the exit code of the process it ran
More like this
Infinite loop
Infinite loop
More like this
error()
error()
More like this
Turing Complete Language
Turing Complete Language
More like this
Fork - When a unix process creates a copy of itself.
Fork - When a unix process creates a copy of itself.
More like this