I know that a command line application should return 0 on success. But are there any “standards” for what other values refer to? e.g. Invalid Arguments, etc.
Are there differences under Windows and Unix?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A standard set of error codes and it’s corresponding messages are present in errno.h. System calls return values can be compared against this.
If you are writing your custom program, then the return value can be what you want it to be. Handling the return values will entirely depend upon you.