Skip to content

Commit 8a3cbd0

Browse files
committed
Ensure process killing does not fail on Windows
1 parent 3c17f76 commit 8a3cbd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

setuptools/tests/test_build_meta.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ def method(*args, **kw):
5050
def _kill(self, pid):
5151
if pid is None:
5252
return
53-
with contextlib.suppress(ProcessLookupError):
54-
os.kill(pid, signal.SIGKILL)
53+
with contextlib.suppress(ProcessLookupError, OSError):
54+
os.kill(pid, signal.SIGTERM if os.name == "nt" else signal.SIGKILL)
5555

5656

5757
class BuildBackendCaller(BuildBackendBase):

0 commit comments

Comments
 (0)