Bug 935677 - Exit status reported by `wait` is incorrect

Unshift the value returned by `os.waitpid()`.