(self, timeout=None)
Wait for child process to terminate; returns self.returncode.
Wait for child process to terminate; returns self.returncode.
Wait for child process to terminate ; returns self . returncode .
def wait(self, timeout=None):
        """Wait for child process to terminate; returns self.returncode."""
        if timeout is not None:
            endtime = _time() + timeout
        try:
            return self._wait(timeout=timeout)
        except KeyboardInterrupt:
            # https://bugs.python.org/issue25942
            # The first keyboard interrupt waits briefly for the child to
            # exit under the common assumption that it also received the ^C
            # generated SIGINT and will exit rapidly.
            if timeout is not None:
                sigint_timeout = min(self._sigint_wait_secs,
                                     self._remaining_time(endtime))
            else:
                sigint_timeout = self._sigint_wait_secs
            self._sigint_wait_secs = 0  # nothing else should wait.
            try:
                self._wait(timeout=sigint_timeout)
            except TimeoutExpired:
                pass
            raise
def wait ( self , timeout = None ) : if timeout is not None : endtime = _time ( ) + timeout try : return self . _wait ( timeout = timeout ) except KeyboardInterrupt : # https://bugs.python.org/issue25942 # The first keyboard interrupt waits briefly for the child to # exit under the common assumption that it also received the ^C # generated SIGINT and will exit rapidly. if timeout is not None : sigint_timeout = min ( self . _sigint_wait_secs , self . _remaining_time ( endtime ) ) else : sigint_timeout = self . _sigint_wait_secs self . _sigint_wait_secs = 0 # nothing else should wait. try : self . _wait ( timeout = sigint_timeout ) except TimeoutExpired : pass raise