Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/utils/lit/lit/util.py
Show First 20 Lines • Show All 418 Lines • ▼ Show 20 Lines | try: | ||||
for child in children_iterator: | for child in children_iterator: | ||||
try: | try: | ||||
child.kill() | child.kill() | ||||
except psutil.NoSuchProcess: | except psutil.NoSuchProcess: | ||||
pass | pass | ||||
psutilProc.kill() | psutilProc.kill() | ||||
except psutil.NoSuchProcess: | except psutil.NoSuchProcess: | ||||
pass | pass | ||||
try: | |||||
import win32api | |||||
except ImportError: | |||||
win32api = None | |||||
def abort_now(): | |||||
"""Abort the current process without doing any exception teardown""" | |||||
sys.stdout.flush() | |||||
if win32api: | |||||
win32api.TerminateProcess(win32api.GetCurrentProcess(), 3) | |||||
else: | |||||
os.kill(0, 9) |