My understanding of the system function is that it returns a 16-bit value, where the high 8 bits are the exit status, and the low 8 are the signal id.Can we really rely on this? I know that this is true for the Perl implementations I worked with, but I can't find anywhere in the docs that the exist status has to be 8 bit. This is certainly true for Unix-like systems. On Windows, programs can return 32 bit exitcode (although at least ActiveState Perl 5.8 and 5.10 throws away part of the bits). I could imagine that in later/different implementations, all 32 bits could be returned on Windows.
In reply to Re: return value from system call, exit status, shift right 8, bitwise and, $?
by rovf
in thread return value from system call, exit status, shift right 8, bitwise and, $?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |