diff --git a/docs/windows.md b/docs/windows.md index 8b565115c..e1b0370ff 100644 --- a/docs/windows.md +++ b/docs/windows.md @@ -138,8 +138,8 @@ configured by `scripts/dev_windows.ps1` builds Publisher acceptance, request sampling, graph-capacity selection, and HTTP APIs follow the [CLI specification](cli-design.md). The default trust store is `Flare\trust.toml` under the Windows Local App Data known folder. `--trust-store` -selects another path. Ctrl-C and Ctrl-Break drain native work before releasing -CUDA resources. +selects another path. Ctrl-C and Ctrl-Break end loading immediately and drain +native work before releasing CUDA resources once serving has started. Disk embedding tables use Windows I/O rings with registered files and buffers. All core shards share each worker's ring and staging allocation; file indices diff --git a/flare-cli/src/main.rs b/flare-cli/src/main.rs index c66489c99..08925c46f 100644 --- a/flare-cli/src/main.rs +++ b/flare-cli/src/main.rs @@ -184,12 +184,6 @@ fn run() -> Result> { { return Err("multi-host serving is not supported on Windows".into()); } - #[cfg(windows)] - unsafe { - if windows_sys::Win32::System::Console::SetConsoleCtrlHandler(Some(stop_console), 1) == 0 { - return Err(std::io::Error::last_os_error().into()); - } - } let bind = args.bind_address(); if args.rank.is_some_and(|rank| rank != 0) { args.serving.select_gpus(1); @@ -707,6 +701,13 @@ fn serve_local( libc::signal(libc::SIGINT, stop as *const () as libc::sighandler_t); libc::signal(libc::SIGTERM, stop as *const () as libc::sighandler_t); } + #[cfg(windows)] + unsafe { + // Loading keeps the default Ctrl-C termination; nothing reads STOP before serving. + if windows_sys::Win32::System::Console::SetConsoleCtrlHandler(Some(stop_console), 1) == 0 { + return Err(std::io::Error::last_os_error().into()); + } + } progress.finish_animation(); if let Err(error) = server.start_dashboard() { eprintln!("Could not start dashboard: {error}");