in reply to Process exit status

return value from system call, exit status, shift right 8, bitwise and, $?

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^2: Process exit status
by Dirk80 (Pilgrim) on Jul 22, 2011 at 13:54 UTC

    Thank you. This post lead me to the following website, which could answer my question.

    http://perldoc.perl.org/perlfaq8.html#Why-can't-I-get-the-output-of-a-command-with-system()%3f

    system runs a command and returns exit status information (as a 16 bit value: the low 7 bits are the signal the process died from, if any, and the high 8 bits are the actual exit value).

    The answer to my original question: 16 bits are needed instead of 8 bits because also the signal id which killed the process has to be stored.