mirror of
https://github.com/open-webui/open-terminal.git
synced 2026-11-05 01:27:28 +00:00
[PR #158] [CLOSED] fix: preserve buffered PTY output after EIO #143
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/open-terminal#143
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-terminal/pull/158
Author: @mikemikimike
Created: 8/22/2026
Status: ❌ Closed
Base:
main← Head:fix/pty-output-eio-145📝 Commits (3)
1b0f307fix: preserve PTY output after child exit8026329Merge branch 'main' into fix/pty-output-eio-145f8e2ecaMerge branch 'main' into fix/pty-output-eio-145📊 Changes
2 files changed (+97 additions, -7 deletions)
View changed files
📝
open_terminal/utils/runner.py(+24 -7)➕
tests/test_runner.py(+73 -0)📄 Description
Summary
Fixes #145.
On Unix PTYs, a child exiting can make the next master-fd read raise
EIOwhile output remains buffered.PtyRunner.read_output()previously stopped immediately, so/executecould report a successful command with an empty output array.This change drains remaining PTY data after
EIO, preserves the existing behavior for otherOSErrorvalues, and centralizes output serialization. Regression coverage includes the EIO branch, non-EIO errors, and a real fast-command PTY check on Unix.Compatibility
No API changes. Windows and pipe-based runners are unchanged.
Verification
python -m pytest -q tests/test_runner.py— 2 passed, 1 skipped on Windows (Unix PTY test)python -m compileall -q open_terminal tests— passedgit diff --check— passedThe repository Docker image build was attempted using
DockerfileandDockerfile.slim, but Docker Hub layer downloads stalled in this environment before the images could be built. The real Unix PTY test is therefore skipped on this Windows host and will run in Linux CI.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.