1 #[cfg(any( 2 target_os = "android", 3 target_os = "illumos", 4 target_os = "linux", 5 target_os = "solaris" 6 ))] 7 mod epoll; 8 9 #[cfg(any( 10 target_os = "android", 11 target_os = "illumos", 12 target_os = "linux", 13 target_os = "solaris" 14 ))] 15 pub(crate) use self::epoll::{event, Event, Events, Selector}; 16 17 #[cfg(any( 18 target_os = "dragonfly", 19 target_os = "freebsd", 20 target_os = "ios", 21 target_os = "macos", 22 target_os = "netbsd", 23 target_os = "openbsd" 24 ))] 25 mod kqueue; 26 27 #[cfg(any( 28 target_os = "dragonfly", 29 target_os = "freebsd", 30 target_os = "ios", 31 target_os = "macos", 32 target_os = "netbsd", 33 target_os = "openbsd" 34 ))] 35 pub(crate) use self::kqueue::{event, Event, Events, Selector}; 36 37 /// Lowest file descriptor used in `Selector::try_clone`. 38 /// 39 /// # Notes 40 /// 41 /// Usually fds 0, 1 and 2 are standard in, out and error. Some application 42 /// blindly assume this to be true, which means using any one of those a select 43 /// could result in some interesting and unexpected errors. Avoid that by using 44 /// an fd that doesn't have a pre-determined usage. 45 const LOWEST_FD: libc::c_int = 3; 46