in reply to Exit with a number
The return value is the exit status of the program as returned by the "wait" call. To get the actual exit value divide by 256.
Sweetblood