in reply to bizzare exit code
hrm, yes... 16777215 is in fact -1, but i've seen in a number of places that the error code is $? >> 8, so i report unsigned i guess...
the reason this is most boggling for me is that everything works fine but i get an error code. and the same bloody error code for any and all programs i call.
anything that would result in real errors, like $PATH being wrong, should also preclude correct running of the programs in question... and it isn't particularly replicatible, when i copy sections of code and run them, they do all the same things but with correct error codes...