The system() function seems to be returning 128 times the exit code I get from the process it\'s evoking.
From the man page:
RETURN VALUE
Your citation of the system man page misses the relevant part:
... This latter return status is in the format specified in wait(2). Thus, the exit code of the command will be WEXITSTATUS(status).
You need to right shift the return value by 8 (at least on Linux), to get the commands exit code.
The portable approach is to just use the macro itself.