Skip to content

Update dependency swiftlang/swift-subprocess to from: "1.0.1" - #168

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/swiftlang-swift-subprocess-1.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/swiftlang-swift-subprocess-1.x

Conversation

@renovate

@renovate renovate Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Update Change
swiftlang/swift-subprocess patch from: "1.0.0" → from: "1.0.1"

Release Notes

swiftlang/swift-subprocess (swiftlang/swift-subprocess)

v1.0.1: Subprocess 1.0.1

Compare Source

Subprocess 1.0.1 is a bug fix release with no API changes. Its biggest change is under the hood: on Linux and FreeBSD, Subprocess now launches processes with posix_spawn instead of fork/exec wherever the C library supports it, which makes launching a process cheaper, especially from a large, multithreaded process. This release also fixes a file descriptor leak in streamed output, closes a descriptor-inheritance race, and makes supplementaryGroups: [] do what it says.


posix_spawn is now preferred on every Unix platform (#​365)

Through 1.0.0, Subprocess used posix_spawn only on Darwin. Every other Unix platform used fork followed by exec, in a second, near-duplicate implementation with its own copy of the executable search loop, the transient-failure retry, the file descriptor bookkeeping, and the error mapping. 1.0.1 merges the two into one shared implementation that prefers posix_spawn everywhere and falls back to fork/exec only for configurations posix_spawn can't express.

Using posix_spawn improves performance significantly when spawning child processes with a large memory footprint. fork() duplicates the calling process's entire address space. posix_spawn avoids that work by using clone(CLONE_VM | CLONE_VFORK) on Glibc and rfork(RFSPAWN) on FreeBSD.

Bug Fixes & Behavior Changes

  • Close .sequence output and error pipes when the body closure stops reading early (#​369). SubprocessOutputSequence closed its pipe only when a read reached end-of-file, so
    breaking out of a for try await loop early leaked one file descriptor per run() call, without bound. run() now closes each .sequence stream exactly once after the body closure
    returns or throws, whether or not the stream was drained.
  • Create pipes and duplicate descriptors with close-on-exec set atomically (#​373). Subprocess used to mark its pipes close-on-exec with a separate fcntl() after creating them, so a process launched from another thread in between could inherit a descriptor that wasn't marked yet. Pipes now come from pipe2(O_CLOEXEC) on Linux, Android, FreeBSD, and OpenBSD, and duplicates from F_DUPFD_CLOEXEC everywhere; Darwin keeps creating pipes the old way until its SDK declares pipe2.
  • supplementaryGroups: [] now drops inherited supplementary groups (#​384). An empty array used to behave exactly like nil, so the new process kept the caller's supplementary groups; any non-nil value now calls setgroups(), and [] drops them all. This is a behavior change: an unprivileged process that sets supplementaryGroups = [] now fails with .spawnFailed (EPERM), as it already did for a non-empty list. Resolves #​381.
  • Report the correct errno when posix_spawnattr setup fails on Darwin (#​368). The thrown SubprocessError carried a leftover success code from an earlier call instead of the error from the failing posix_spawnattr_* call.
  • Make the CMake build suitable for Swift toolchain builds (#​376). Prepare Subprocess to be used as a dependency in CMake builds.

Detailed Change Log

New Contributors

Full Changelog: swiftlang/swift-subprocess@1.0.0...1.0.1


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants