[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:
5dbfd19ad5.
I've verified that this change passes all tests.
This commit is contained in:
Rain 2024-11-13 05:26:31 +00:00
parent 242f20dc1e
commit fb3edb2fc7

View File

@ -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",