mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-28 12:10:37 +00:00
21 lines
399 B
Rust
21 lines
399 B
Rust
#![cfg(unix)]
|
|
|
|
extern crate libc;
|
|
|
|
pub mod support;
|
|
use support::*;
|
|
|
|
#[test]
|
|
fn simple() {
|
|
let mut lp = Core::new().unwrap();
|
|
|
|
let signal = run_core_with_timeout(&mut lp, Signal::new(libc::SIGUSR1))
|
|
.expect("failed to create signal");
|
|
|
|
send_signal(libc::SIGUSR1);
|
|
|
|
run_core_with_timeout(&mut lp, signal.into_future())
|
|
.ok()
|
|
.expect("failed to get signal");
|
|
}
|