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