Hello everyone
So I got a MasterPty like this :
let master_fd = posix_openpt(OFlag::O_RDWR).unwrap();
And now I would like to call close on it, from a forked child process. the nix::unistd::close() function accepts a RawFd as a parameter, and in the documentation, here : https://docs.rs/nix/0.17.0/nix/pty/struct.PtyMaster.html, it says that MasterPty implements AsRawFd. But when I try to call .as_raw_fd() on my PtyMaster, the compiler says this :
221 | close(master_fd.as_raw_fd());
| ^^^^^^^^^ method not found in `nix::pty::PtyMaster`
What should I do ?
Ps apparently, RawFd is marked as private, but that doesn't help much...