mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
19 lines
434 B
Rust
19 lines
434 B
Rust
#![cfg(unix)]
|
|
#![cfg(feature = "signal")]
|
|
#![warn(rust_2018_idioms)]
|
|
|
|
mod support;
|
|
use support::*;
|
|
|
|
#[tokio::test]
|
|
async fn drop_then_get_a_signal() {
|
|
let kind = SignalKind::user_defined1();
|
|
let sig = signal(kind).expect("failed to create first signal");
|
|
drop(sig);
|
|
|
|
send_signal(libc::SIGUSR1);
|
|
let sig = signal(kind).expect("failed to create second signal");
|
|
|
|
let _ = with_timeout(sig.into_future()).await;
|
|
}
|