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
From POSIX system(3):
If command is not a null pointer, system() shall return the termination status of the command language interpreter in the format specified by waitpid().
To get the return code, you need to use the WEXITSTATUS macro.
WEXITSTATUS