'Wait for and return the exit status of the child process.'

def wait(self):

    if (self.sts < 0):
        (pid, sts) = os.waitpid(self.pid, 0)
        assert (pid == self.pid)
        self.sts = sts
    return self.sts
