richardcase / richardcase/clowder

Drain subprocess stdout and stderr concurrently

Open
#139 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug priority: medium
Dominant language
Rust
Stars
0
Forks
0
Avg merge
1h 14m
Merged PRs (30d)
16

Description

Problem

ProcessCommandRunner drains stdout fully before stderr. A child that fills stderr while keeping stdout open can block forever before either stream reaches EOF.

Evidence: https://github.com/richardcase/clowder/blob/b5492d5/macos/Sources/ClowderApp/ProcessCommandRunner.swift#L37-L44

Acceptance criteria

  • Drain both pipes concurrently while the process runs.
  • Continue closing stdin before reading.
  • Add a test with output larger than the pipe capacity on both streams.

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 in macos/Sources/ClowderApp/ProcessCommandRunner.swift around lines 37-44, where stdout and stderr are drained sequentially. Preserve closing stdin before reading, then add coverage for output larger than pipe capacity on both streams and verify the process completes without blocking.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.