apple / apple/swift-system

Add variants of `pipe()`, and `duplicate()` that wrap `pipe2` and `dup3`

Open
#228 2 comments 0 reactions 0 assignees View on GitHub
enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.