1 2 3 4 5 6 7 8 9 10
use std::os::unix::prelude::{AsRawFd, RawFd}; pub type FileDescriptor = RawFd; /// Get the file descriptor for stdout. pub fn stdout_fd() -> FileDescriptor { std::io::stdout().as_raw_fd() }