Changeset 69578 in vbox for trunk/src/VBox/ValidationKit/testdriver
- Timestamp:
- Nov 4, 2017 10:19:34 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 118928
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testdriver/winbase.py
r69546 r69578 41 41 import win32event; # pylint: disable=import-error 42 42 import win32process; # pylint: disable=import-error 43 import winerror; # pylint: disable=import-error 44 import pywintypes; # pylint: disable=import-error 43 45 44 46 # Validation Kit imports. … … 112 114 def processExists(uPid): 113 115 """ The Windows version of base.processExists """ 114 # pylint: disable=no-member 115 fRc = False; 116 try: 117 hProcess = win32api.OpenProcess(win32con.PROCESS_QUERY_INFORMATION, False, uPid); 118 except: 116 # We try open the process for waiting since this is generally only forbidden in a very few cases. 117 try: 118 hProcess = win32api.OpenProcess(win32con.SYNCHRONIZE, False, uPid); # pylint: disable=no-member 119 except pywintypes.error as oXcpt: # pylint: disable=no-member 120 if oXcpt.winerror == winerror.ERROR_INVALID_PARAMETER: 121 return False; 122 if oXcpt.winerror != winerror.ERROR_ACCESS_DENIED: 123 reporter.logXcpt('uPid=%s oXcpt=%s' % (uPid, oXcpt)); 124 return False; 125 reporter.logXcpt('uPid=%s oXcpt=%s' % (uPid, oXcpt)); 126 except Exception as oXcpt: 119 127 reporter.logXcpt('uPid=%s' % (uPid,)); 128 return False; 120 129 else: 121 130 hProcess.Close(); #win32api.CloseHandle(hProcess) 122 fRc = True; 123 return fRc; 131 return True; 124 132 125 133 def processCheckPidAndName(uPid, sName):
Note:
See TracChangeset
for help on using the changeset viewer.