Answer the question
In order to leave comments, you need to log in
Are there standards for exit codes?
Greetings.
Tell me, are there standards that define which exit codes to use for which errors? For example, a separate code for a config parsing error, a separate one for bad arguments, another one for runtime errors (like divide by zero), maybe a separate one for I/O errors. The maximum that could be found is such a document.
And in general, how widespread is the use of these codes more than just such a banality?myscritp || echo "Exterminate!!!!1"
Answer the question
In order to leave comments, you need to log in
Completely at the discretion of the developer.
The only standard is 0 = success.
Everything else depends on the purpose of the program.
If you want to make it convenient, you can look at the error codes of the most popular programs that are as similar as possible to what you write. But it's not a standard, but...
139 segfault
404 not found
what other codes do you need?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question