Example #1
0
 def terminate(self):
     if self.returncode is None:
         try:
             _subprocess.TerminateProcess(int(self._handle), TERMINATE)
         except WindowsError:
             if self.wait(timeout=0.1) is None:
                 raise
 def terminate(self):
     try:
         _subprocess.TerminateProcess(self._handle, 1)
     except OSError as e:
         if e.winerror != 5:
             raise
         rc = _subprocess.GetExitCodeProcess(self._handle)
         if rc == _subprocess.STILL_ACTIVE:
             raise
         self.returncode = rc
Example #3
0
 def terminate(self):
     if self.returncode is None:
         try:
             _subprocess.TerminateProcess(int(self._handle), TERMINATE)
         except WindowsError, e:
             if self.wait(timeout=0.1) is None:
                 # ERROR_ACCESS_DENIED (winerror 5) is received when the
                 # process already died.
                 if e.winerror != 5:
                     raise
                 else:
                     print >> sys.stderr, "NICKNICK GOTCHA 1"
Example #4
0
 def terminate(self):
     '''
     Terminates the process
     '''
     try:
         _subprocess.TerminateProcess(self._handle, 1)
     except OSError:
         # ERROR_ACCESS_DENIED (winerror 5) is received when the
         # process already died.
         ecode = _subprocess.GetExitCodeProcess(self._handle)
         if ecode == _subprocess.STILL_ACTIVE:
             raise
         self.exitstatus = ecode
Example #5
0
        def terminate(self):
            if self.returncode is None:
                try:
                    _subprocess.TerminateProcess(int(self._handle), TERMINATE)
# EPIC EDIT start -- nick.shin 2019-06-13 -- UE-76260
                except WindowsError, e:
                    if self.wait(timeout=0.1) is None:
                        # ERROR_ACCESS_DENIED (winerror 5) is received when the
                        # process already died.
                        if e.winerror != 5:
                            print('NICKNICK: forking.py e.winerror:',
                                  e.winerror)
                            raise
Example #6
0
 def terminate(self):
     """Terminates the process
     """
     try:
         _subprocess.TerminateProcess(self._handle, 1)
     except OSError as e:
         # ERROR_ACCESS_DENIED (winerror 5) is received when the
         # process already died.
         if e.winerror != 5:
             raise
         rc = _subprocess.GetExitCodeProcess(self._handle)
         if rc == _subprocess.STILL_ACTIVE:
             raise
         self.returncode = rc
Example #7
0
 def _Popen_terminate(self):
     """taken from subprocess.py of python 2.7"""
     try:
         _subprocess.TerminateProcess(self._handle, 1)
     except OSError:
         ex = sys.exc_info()[1]
         # ERROR_ACCESS_DENIED (winerror 5) is received when the
         # process already died.
         if ex.winerror != 5:
             raise
         rc = _subprocess.GetExitCodeProcess(self._handle)
         if rc == _subprocess.STILL_ACTIVE:
             raise
         self.returncode = rc
 def terminate(self):
     """Terminates the process
     """
     _subprocess.TerminateProcess(self._handle, 1)
Example #9
0
 def terminate(self):
     _subprocess.TerminateProcess(self._handle, 1)