about summary refs log tree commit diff
path: root/library/std/src/sys
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2024-11-14 17:55:25 -0800
committerGitHub <noreply@github.com>2024-11-14 17:55:25 -0800
commita5510a5430d2107f936cfc3ac6298d1daadbde4d (patch)
tree5c825303d56a2efb973d6d26a94ebdaa3e14bc98 /library/std/src/sys
parent3f9f7c4a720ca405d97ce79c969051ec66516e56 (diff)
parentfb3edb2fc7c0ff8ec51dbebc11a455b53767d236 (diff)
downloadrust-a5510a5430d2107f936cfc3ac6298d1daadbde4d.tar.gz
rust-a5510a5430d2107f936cfc3ac6298d1daadbde4d.zip
Rollup merge of #132984 - sunshowers:pipe2, r=tgross35
[illumos] use pipe2 to create anonymous pipes

pipe2 allows the newly-created pipe to atomically be CLOEXEC.

pipe2 was added to illumos a long time ago:
https://github.com/illumos/illumos-gate/commit/5dbfd19ad5fcc2b779f40f80fa05c1bd28fd0b4e. I've verified that this change passes all of std's tests on illumos.
Diffstat (limited to 'library/std/src/sys')
-rw-r--r--library/std/src/sys/pal/unix/pipe.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/sys/pal/unix/pipe.rs b/library/std/src/sys/pal/unix/pipe.rs
index f0ebc767bad..4a992e32a91 100644
--- a/library/std/src/sys/pal/unix/pipe.rs
+++ b/library/std/src/sys/pal/unix/pipe.rs
@@ -23,6 +23,7 @@ pub fn anon_pipe() -> io::Result<(AnonPipe, AnonPipe)> {
             target_os = "dragonfly",
             target_os = "freebsd",
             target_os = "hurd",
+            target_os = "illumos",
             target_os = "linux",
             target_os = "netbsd",
             target_os = "openbsd",