From 9e4745904787597ed5be44f91b31812b97011465 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Fri, 7 Jul 2023 16:51:41 -0400 Subject: [PATCH] cleanup: remove unused function --- src/process.rs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/process.rs b/src/process.rs index 9736e36..7f381e9 100644 --- a/src/process.rs +++ b/src/process.rs @@ -17,18 +17,3 @@ pub(crate) fn mark_as_not_cloexec(file: &impl AsFd) -> Result<()> { .wrap_err("failed to set CLOEXEC on file")?; Ok(()) } - -pub(crate) fn mark_as_cloexec(file: &impl AsFd) -> Result<()> { - let raw_fd = file.as_fd().as_raw_fd(); - let fd_flags = fcntl::FdFlag::from_bits( - fcntl::fcntl(raw_fd, fcntl::FcntlArg::F_GETFD) - .wrap_err("failed to get GETFD value of stream")?, - ) - .wrap_err("failed to get fd flags from file")?; - fcntl::fcntl( - raw_fd, - fcntl::FcntlArg::F_SETFD(fd_flags.union(fcntl::FdFlag::FD_CLOEXEC)), - ) - .wrap_err("failed to set CLOEXEC on file")?; - Ok(()) -}