1 #![cfg(unix)]
2 
3 extern crate libc;
4 
5 pub mod support;
6 use support::*;
7 
8 #[test]
notify_both()9 fn notify_both() {
10     let mut rt = CurrentThreadRuntime::new().unwrap();
11     let signal1 =
12         run_with_timeout(&mut rt, Signal::new(libc::SIGUSR2)).expect("failed to create signal1");
13 
14     let signal2 =
15         run_with_timeout(&mut rt, Signal::new(libc::SIGUSR2)).expect("failed to create signal2");
16 
17     send_signal(libc::SIGUSR2);
18     run_with_timeout(&mut rt, signal1.into_future().join(signal2.into_future()))
19         .ok()
20         .expect("failed to receive");
21 }
22