Function poll

Source
pub fn poll(fds: &mut [PollFd<'_>], timeout: Option<&Timespec>) -> Result<usize>
Available on crate feature event only.
Expand description

poll(self.fds, timeout)—Wait for events on lists of file descriptors.

Some platforms (those that don’t support ppoll) don’t support timeouts greater than c_int::MAX milliseconds; if an unsupported timeout is passed, this function fails with io::Errno::INVAL.

On macOS, poll doesn’t work on fds for /dev/tty or /dev/null, however select is available and does work on these fds.

This function does not use the Buffer trait because the fds list is both an input and output buffer.

§References