Skip to content

Commit

Permalink
fix(service/serve): send CTRL+Break instead of Ctrl+c on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
rupansh committed Jul 15, 2024
1 parent 31b08ad commit d31a2c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/service/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ impl ServerProcess {
#[cfg(windows)]
unsafe {
use windows::Win32::System::Console::GenerateConsoleCtrlEvent;
use windows::Win32::System::Console::CTRL_C_EVENT;
use windows::Win32::System::Console::CTRL_BREAK_EVENT;

GenerateConsoleCtrlEvent(CTRL_C_EVENT, pid)?;
GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT, pid)?;
}

proc.wait().await?;
Expand Down

0 comments on commit d31a2c3

Please sign in to comment.