added bitshift for extract MSB of return code (posix)