fix: preserve handoff cleanup and ICDB cancellation bindings

This commit is contained in:
阿白叔 committed 2026-11-18 09:05:22 +08:00
1 parent b4737b5102
commit fa1f662e1d
6 files changed
+169 -10

No files matched your search

+10 -8
View File
@@ -336,11 +336,13 @@ def _supervise_repair(command, desktop, cancel, root, timeout_seconds, progress,
worker.request_stop()
raise
finally:
if entered:
native.__exit__(None, None, None)
if worker.poll() is None and getattr(worker, 'session_record_path', None):
from .session_record import handoff_session
from .operation_queue import hold_native_handoff
handoff_session(worker.session_record_path, evidence_root=root, process=worker)
hold_native_handoff(worker, worker.session_record_path)
worker.close()
try:
if entered:
native.__exit__(None, None, None)
if worker.poll() is None and getattr(worker, 'session_record_path', None):
from .session_record import handoff_session
from .operation_queue import hold_native_handoff
handoff_session(worker.session_record_path, evidence_root=root, process=worker)
hold_native_handoff(worker, worker.session_record_path)
finally:
worker.close()