Unanswered: Handling negative return code value in ksh
I am running a third party program from within a korn shell script (aix 5.1).
The program returns zero, positive and negative return code values but the negative ones are represented as positive integers in the $? return code variable. For example -1 becomes 255, -2 becomes 254 etc.
My script needs to convey these return codes (to a calling process) as a true negative value (ie a value that that will actually test negative). Is there any way to do this (preferably within a shell script) ?