xref: /aosp_15_r20/external/skia/infra/bots/recipe_modules/build/resources/cleanup_win_processes.py (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1# Copyright 2024 Google LLC
2#
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6# [VPYTHON:BEGIN]
7# wheel: <
8#  name: "infra/python/wheels/psutil/${vpython_platform}"
9#  version: "version:5.8.0.chromium.2"
10# >
11# [VPYTHON:END]
12
13import psutil
14for p in psutil.process_iter():
15  try:
16    if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'):
17      p.kill()
18  except psutil._error.AccessDenied:
19    pass
20