pub async fn graceful_shutdown_tree<F, Fut>(
process_manager: &dyn ProcessManager,
pid: ProcessId,
send_shutdown: F,
ack_timeout: Duration,
exit_timeout: Duration,
) -> Result<GracefulShutdownOutcome, Error>Expand description
Attempt a graceful shutdown of pid.
The caller provides send_shutdown, which should represent the RPC to the
target process’ process.shutdown_tree handler, returning when the target
acknowledges the request.
Behavior:
- wait for ack up to
ack_timeout - wait for exit up to
exit_timeout - if either step times out, force-kill the tree and wait again up to
exit_timeout
This is intentionally transport-agnostic: IPC wiring lives elsewhere.