1#![cfg_attr(docsrs, feature(doc_cfg))]
17#![cfg_attr(feature = "once_cell_try", feature(once_cell_try))]
18#![allow(unused_features)]
19#![warn(missing_docs)]
20#![deny(rustdoc::broken_intra_doc_links)]
21#![doc(
22 html_logo_url = "https://github.com/compio-rs/compio-logo/raw/refs/heads/master/generated/colored-bold.svg"
23)]
24#![doc(
25 html_favicon_url = "https://github.com/compio-rs/compio-logo/raw/refs/heads/master/generated/colored-bold.svg"
26)]
27
28#[cfg(windows)]
29pub mod windows;
30
31#[cfg(unix)]
32pub mod unix;
33
34pub async fn ctrl_c() -> std::io::Result<()> {
36 #[cfg(windows)]
37 {
38 windows::ctrl_c().await
39 }
40 #[cfg(unix)]
41 {
42 use nix::sys::signal::Signal;
43
44 unix::signal(Signal::SIGINT as _).await
45 }
46}