swiftlang / swiftlang/swift-subprocess

Control over stream writing errors

Open
#265 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Swift
Stars
734
Forks
68
Avg merge
9d 2h
Merged PRs (30d)
6

Description

AsyncProcess gives some control and information about potential standard input stream writing options even when automatically pulling from an AsyncSequence<Bytes>.

In a way, this is similar to set -o pipefail:

  • Sometimes you care about write errors (because you need to make sure that all bytes have been read), similar to set -o pipefail
  • Sometimes you don't care
  • Sometimes you want to terminate the process on write errors
  • Sometimes you don't

We need to double-check that we have the required controls there.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked AsyncProcess.swift ProcessExecutor.swift and ProcessExit.swift sections, then trace how automatic AsyncSequence input handles stream writes. Clarify the desired controls for observing write errors and terminating the process, and confirm the resulting behavior with relevant subprocess tests.

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
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.