Changeset 65116 in vbox
- Timestamp:
- Jan 4, 2017 3:58:27 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testdriver/vboxinstaller.py
r65115 r65116 782 782 return False; 783 783 784 def _killProcessesByName(self, sName, sDesc ):784 def _killProcessesByName(self, sName, sDesc, fChildren = False): 785 785 """ Checks whether the named process is present or not. """ 786 786 cKilled = 0; 787 for oProcess in utils.processListAll(): 787 aoProcesses = utils.processListAll(); 788 for oProcess in aoProcesses: 788 789 sBase = oProcess.getBaseImageNameNoExeSuff(); 789 790 if sBase is not None and sBase.lower() == sName: … … 791 792 utils.processKill(oProcess.iPid); 792 793 cKilled += 1; 794 795 if fChildren: 796 for oChild in aoProcesses: 797 if oChild.iParentPid == oProcess.iPid and oChild.iParentPid is not None: 798 reporter.log('Killing %s child process: %s (%s)' % (sDesc, oChild.iPid, sBase)); 799 utils.processKill(oChild.iPid); 800 cKilled += 1; 793 801 return cKilled; 794 802 … … 818 826 # Before we start uninstalling anything, just ruthlessly kill any 819 827 # msiexec and drvinst process we might find hanging around. 820 cKilled = 0;821 828 if self._isProcessPresent('drvinst'): 822 829 time.sleep(15); # In the hope that it goes away. 823 cKilled = self._killProcessesByName('drvinst', 'MSI driver installation'); 824 if cKilled > 0: 825 time.sleep(15); # Give related MSI process a chance to clean up after we killed the driver installer. 830 cTimes = 0; 831 while cTimes < 4: 832 cTimes += 1; 833 cKilled = self._killProcessesByName('drvinst', 'MSI driver installation', True); 834 if cKilled <= 0: 835 break; 836 time.sleep(10); # Give related MSI process a chance to clean up after we killed the driver installer. 826 837 827 838 if self._isProcessPresent('msiexec'):
Note:
See TracChangeset
for help on using the changeset viewer.