Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does process exit status 3 mean?

Tags:

I've seen the usage of exit status 3 in several python scripts that restart processes. As far as I know the convention is only about 0 and "not 0" on Unix/Linux.

Is there a convention defining other values like 3.

like image 476
deamon Avatar asked Oct 22 '10 10:10

deamon


1 Answers

At least in the old days, a return value of 1 generally meant a hard error and value 2 was usually reserved for problems with the command line arguments — it meant that the user had made an error, not the program. But beyond that: no, no convention; and even that slight convention was not universal. Like dashes in front of command-line arguments, which some versions of ps(1) let you omit, return codes were just convention. In general, read the docs (or the source!) to the script you're running and you then have to write error-code checking code to its specific meanings.

like image 53
Brandon Rhodes Avatar answered Oct 16 '22 02:10

Brandon Rhodes