forked from Proxmox/proxmox
sys: impl AsFd for PidFd
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
34f47339d5
commit
34688a6d74
@ -2,7 +2,7 @@
|
||||
|
||||
use std::fs::File;
|
||||
use std::io;
|
||||
use std::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, OwnedFd, RawFd};
|
||||
use std::os::unix::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, OwnedFd, RawFd};
|
||||
|
||||
use nix::fcntl::OFlag;
|
||||
use nix::sys::signal::Signal;
|
||||
@ -155,6 +155,12 @@ impl PidFd {
|
||||
}
|
||||
}
|
||||
|
||||
impl AsFd for PidFd {
|
||||
fn as_fd(&self) -> BorrowedFd<'_> {
|
||||
self.fd.as_fd()
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRawFd for PidFd {
|
||||
fn as_raw_fd(&self) -> RawFd {
|
||||
self.fd.as_raw_fd()
|
||||
|
Loading…
x
Reference in New Issue
Block a user