[Bug]: Fix maximum recursion depth triggered on exception exit (#3519)

This commit is contained in:
Kebe
2025-02-25 09:39:38 -08:00
committed by GitHub
parent 107710268a
commit 60524920ba
+3
View File
@@ -499,6 +499,9 @@ def kill_process_tree(parent_pid, include_parent: bool = True, skip_pid: int = N
pass pass
if include_parent: if include_parent:
if parent_pid == os.getpid():
sys.exit(0)
else:
try: try:
itself.kill() itself.kill()