Created
August 10, 2013 01:21
-
-
Save bbhenry/6198584 to your computer and use it in GitHub Desktop.
Perl_test_exit_code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
system(); | |
if ($? == -1) { | |
print "failed to execute: $!\n"; | |
} elsif ($? & 127) { | |
printf "child died - signal %d, %s coredump\n", | |
($? & 127), ($? & 128) ? 'with' : 'without'; | |
} else { | |
printf "child exited with value %d\n", $? >> 8; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment