use proxmox::tools::fd::fd_change_cloexec from proxmox 0.15.3
Depend on proxmox 0.15.3 Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
@ -32,7 +32,7 @@ url = "2.1"
|
||||
walkdir = "2"
|
||||
zstd = { version = "0.6", features = [ "bindgen" ] }
|
||||
|
||||
proxmox = { version = "0.15.0", default-features = false, features = [ "tokio" ] }
|
||||
proxmox = { version = "0.15.3", default-features = false, features = [ "tokio" ] }
|
||||
proxmox-borrow = "1"
|
||||
proxmox-io = { version = "1", features = [ "tokio" ] }
|
||||
proxmox-lang = { version = "1" }
|
||||
|
@ -1,14 +0,0 @@
|
||||
//! Raw file descriptor related utilities.
|
||||
|
||||
use std::os::unix::io::RawFd;
|
||||
|
||||
use anyhow::Error;
|
||||
use nix::fcntl::{fcntl, FdFlag, F_GETFD, F_SETFD};
|
||||
|
||||
/// Change the `O_CLOEXEC` flag of an existing file descriptor.
|
||||
pub fn fd_change_cloexec(fd: RawFd, on: bool) -> Result<(), Error> {
|
||||
let mut flags = unsafe { FdFlag::from_bits_unchecked(fcntl(fd, F_GETFD)?) };
|
||||
flags.set(FdFlag::FD_CLOEXEC, on);
|
||||
fcntl(fd, F_SETFD(flags))?;
|
||||
Ok(())
|
||||
}
|
@ -7,7 +7,6 @@ pub mod compression;
|
||||
pub mod crypt;
|
||||
pub mod crypt_config;
|
||||
pub mod format;
|
||||
pub mod fd;
|
||||
pub mod fs;
|
||||
pub mod io;
|
||||
pub mod json;
|
||||
|
Reference in New Issue
Block a user