-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FreeBSD nix::sys::event::Kqueue access to inner type #2183
Comments
Kinda similar to #1998 Would implementing impl std::os::fd::AsFd for Kqueue {
fn as_fd(&self) -> BorrowedFd<'_> {
self.0.as_fd()
}
}
Maybe we should also do this to |
Why is there ever a problem for close? Are you trying to close the underlying file descriptor without dropping the struct? I don't know of any good reasons to do that. |
I believe impl From<ChildStderr> for OwnedFd
impl From<ChildStdin> for OwnedFd
impl From<ChildStdout> for OwnedFd
impl From<File> for OwnedFd
impl From<PidFd> for OwnedFd
impl From<TcpListener> for OwnedFd |
I was away for a while due to some problems. The developers (including me) decided to stop using nix crate in our projects and use libc crate only, to avoid abstractions like libc -> nix -> own abstraction. Also taking into account that the some implementations in nix crate not what is required. Thank you. |
An important functionality is missing in 0.27 for Kqueue.
0
ofKqueue
is private"There is no way it is possible to close the fd of the kqueue (OwnedFd should do it but in some cases it a raw fd is needed). as_raw_fd() is needed.
pub struct Kqueue(OwnedFd); pub struct Epoll(pub OwnedFd);
It would be great to have the same for KQueue.
The text was updated successfully, but these errors were encountered: