pub async fn quiesce_srv(
child: &mut Child,
stdin: Option<ChildStdin>,
graceful_timeout: Duration,
) -> Result<(ExitStatus, QuiesceOutcome)>Expand description
Stop srv and return only once it has genuinely exited — never a fixed
sleep. The launcher’s one way of stopping srv: on every quit (both
supervisors) and before a migration (run_migration_upgrade).
Telling srv to stop is dropping stdin, its keepalive pipe: srv reads
EOF as “shut down” on every platform (bootstrap::install_shutdown_handlers)
and closes every agent gracefully on the way out
(agent_teardown::app_exit). Unix also gets SIGTERM, which does the same.
Only if srv hasn’t exited after graceful_timeout is it force-killed —
on Windows, whatever it still runs then goes with J0.