Add variants of `pipe()`, and `duplicate()` that wrap `pipe2` and `dup3`
- Dominant language
- Swift
- Stars
- 1.4k
- Forks
- 154
- PR merge metrics
- No merged PRs in 30d
Description
pipe2() and dup3() were standardized by POSIX 2024 and are already supported on most platforms (Linux, BSD) outside of macOS.
We should add new overloads of the Swift System functions which accept the flags (like O_CLOEXEC). For Apple platforms, which don't support these calls, we could compile them out for now, throw an error, or add unavailable annotations.
Contributor guide
Research direction
Start by reading the existing Swift System pipe() and duplicate() entry points and how they map to platform system calls. Add flag-taking variants that use pipe2 and dup3 where available, and verify that the chosen behavior for Apple platforms is explicit; done means supported platforms expose the variants and platform limitations are handled consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100