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