Skip to main content

install_shutdown_handlers

Function install_shutdown_handlers 

Source
pub fn install_shutdown_handlers(watch_stdin: bool) -> CancellationToken
Expand description

Steps 8 & 9: spawn the stdin-watch thread (exit on EOF — matching Go’s stdinReadWatch) and the SIGINT/SIGTERM handler. Both cancel the returned token, which the WAL checkpoint loop and the final server select! also watch for graceful shutdown.