Command return codes?
Posted: 2006-03-27T06:22:59-07:00
Can anyone provide us with a little info on the command return codes?
e.g., using php/shell
$array is empty and $var is assigned a number.
When the command works, $var= 1; when it doesn't, $var= 127 for one type of forced error.
I can't find a list of error codes anywhere.
Is "1" the proper return for a good execution and anything orther than "1" not?
Or, should maybe "0" be the proper return for a good executon and the "1" is indicating some is wrong even though the command seems to be working?
e.g., using php/shell
Code: Select all
exec("convert-path $map_fpfile -colors 100 -quality 75 -resize $width x $height $saved_fpfile", $array, $var);
When the command works, $var= 1; when it doesn't, $var= 127 for one type of forced error.
I can't find a list of error codes anywhere.
Is "1" the proper return for a good execution and anything orther than "1" not?
Or, should maybe "0" be the proper return for a good executon and the "1" is indicating some is wrong even though the command seems to be working?