about summary refs log tree commit diff
path: root/library/std/src/sys
diff options
context:
space:
mode:
authorChris Denton <christophersdenton@gmail.com>2022-04-26 15:56:26 +0100
committerChris Denton <christophersdenton@gmail.com>2022-04-26 15:56:26 +0100
commitb89b0567427932fe37851a314610d795258f1834 (patch)
treede836ef390199bc7592478250cd39b2656800f71 /library/std/src/sys
parent7417110cefda899a685a77557ac2bd7d7ee07e54 (diff)
downloadrust-b89b0567427932fe37851a314610d795258f1834.tar.gz
rust-b89b0567427932fe37851a314610d795258f1834.zip
Add `set_inheritable` for Windows `Handle`s
Diffstat (limited to 'library/std/src/sys')
-rw-r--r--library/std/src/sys/windows/handle.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/std/src/sys/windows/handle.rs b/library/std/src/sys/windows/handle.rs
index ef9a8bd6900..3b609825a79 100644
--- a/library/std/src/sys/windows/handle.rs
+++ b/library/std/src/sys/windows/handle.rs
@@ -221,6 +221,10 @@ impl Handle {
         Ok(Self(self.0.duplicate(access, inherit, options)?))
     }
 
+    pub(crate) fn set_inheritable(&self) -> io::Result<()> {
+        self.0.set_inheritable()
+    }
+
     /// Performs a synchronous read.
     ///
     /// If the handle is opened for asynchronous I/O then this abort the process.