Isolate interactive terminal session ownership

This commit is contained in:
ms2k 2026-08-01 00:00:47 +09:00
commit 690738d846

View file

@ -422,7 +422,13 @@ impl ClientBackend for CoordinatorClientBackend {
} else {
execute_over_control_face_as(&endpoint, argv, stdout, stderr, &self.identity)?
};
if let Some(coordinator) = self.coordinator.take() {
self.bootstrap_owner.take();
if let Some(coordinator) = self.coordinator.take()
&& coordinator
.has_exited()
.map_err(failure)
.map_err(ClientError::Backend)?
{
let status = coordinator
.reap()
.map_err(failure)
@ -433,7 +439,6 @@ impl ClientBackend for CoordinatorClientBackend {
))));
}
}
self.bootstrap_owner.take();
Ok(exit)
}
}