The return value of a system call is the exit status of the program as
returned by the wait call. The information in the full exit code consists
of: whether the program ended successfully, the exit code passed to exit,
the signal that terminated it, and whether a core dump was produced.
To get the actual exit value, shift right by eight.
Quick summary of the possibilities:
$exit_value = $? >> 8; # Exit code of the underlying command
$signal_num = $? & 127; # Signal that killed the process
$dumped_core = $? & 128; # Was core dumped?
Signed-off-by: Agustin Martin Domingo <email@example.com>