Skip to content

Commit 61aebf7

Browse files
Revert "Add set_inheritable for Windows Handles"
This reverts commit b89b056.
1 parent 7925656 commit 61aebf7

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

library/std/src/os/windows/io/handle.rs

-12
Original file line numberDiff line numberDiff line change
@@ -204,18 +204,6 @@ impl OwnedHandle {
204204
})?;
205205
unsafe { Ok(Self::from_raw_handle(ret)) }
206206
}
207-
208-
/// Allow child processes to inherit the handle.
209-
pub(crate) fn set_inheritable(&self) -> io::Result<()> {
210-
cvt(unsafe {
211-
c::SetHandleInformation(
212-
self.as_raw_handle(),
213-
c::HANDLE_FLAG_INHERIT,
214-
c::HANDLE_FLAG_INHERIT,
215-
)
216-
})?;
217-
Ok(())
218-
}
219207
}
220208

221209
impl TryFrom<HandleOrInvalid> for OwnedHandle {

library/std/src/sys/windows/handle.rs

-4
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,6 @@ impl Handle {
221221
Ok(Self(self.0.duplicate(access, inherit, options)?))
222222
}
223223

224-
pub(crate) fn set_inheritable(&self) -> io::Result<()> {
225-
self.0.set_inheritable()
226-
}
227-
228224
/// Performs a synchronous read.
229225
///
230226
/// If the handle is opened for asynchronous I/O then this abort the process.

0 commit comments

Comments
 (0)