Files
tokio/tokio-signal/tests/simple.rs
T
Ivan Petkov d8b23ef852 signal: rename SignalKind methods (#1457)
This renames the SignalKind constructors to be a bit more readable
instead of using the signal names themselves
2019-08-15 21:09:09 -07:00

18 lines
337 B
Rust

#![cfg(unix)]
#![warn(rust_2018_idioms)]
#![feature(async_await)]
pub mod support;
use crate::support::*;
use libc;
#[tokio::test]
async fn simple() {
let signal = Signal::new(SignalKind::user_defined1()).expect("failed to create signal");
send_signal(libc::SIGUSR1);
let _ = with_timeout(signal.into_future()).await;
}