

def wait(self, timeout=None, check_interval=0.01):
    if (timeout is not None):
        endtime = (time.time() + timeout)
    try:
        while True:
            status = self.poll()
            if (status is not None):
                return status
            if ((timeout is not None) and (time.time() > endtime)):
                raise TimeoutExpired(self.args, timeout)
            sleep(check_interval)
    except OSError as e:
        if (e.errno == errno.ECHILD):
            return (- 1)
        else:
            raise
    _communicate = FunctionType(subprocess_orig.Popen._communicate.__code__, globals())
    try:
        _communicate_with_select = FunctionType(subprocess_orig.Popen._communicate_with_select.__code__, globals())
        _communicate_with_poll = FunctionType(subprocess_orig.Popen._communicate_with_poll.__code__, globals())
    except AttributeError:
        pass

dataset/ETHPy150Open veegee/guv/guv/green/subprocess.py Popen.wait/original