Skip to content

Commit 6b4e22f

Browse files
committed
Add Safety comment to newly added unsafe call.
1 parent 3005fef commit 6b4e22f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,7 @@ async fn send(args: SendArgs) -> anyhow::Result<()> {
790790
.unwrap_or_else(|e| eprintln!("Failed to end process: {e}"));
791791

792792
#[cfg(windows)]
793+
// Safety: Raw syscall to re-send the Ctrl+C event to the console
793794
if unsafe { GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0) } == 0 {
794795
eprintln!("Failed to end process: {}", std::io::Error::last_os_error());
795796
}

0 commit comments

Comments
 (0)