Helper for decoding waitpid status values