Skip to content

fix: treat PTY hangup as EOF#6

Merged
cmilesio merged 2 commits into
mainfrom
fix/pty-eio
Jul 16, 2026
Merged

fix: treat PTY hangup as EOF#6
cmilesio merged 2 commits into
mainfrom
fix/pty-eio

Conversation

@cmilesio

Copy link
Copy Markdown
Member

What

  • Treats the Unix PTY master EIO produced after the final slave closes as normal EOF.
  • Applies that normalization only to PTY reads so real writer and output-forwarding failures still surface.
  • Adds real-kernel PTY coverage for both successful commands and commands with a non-zero exit status.

Why

Execx v1.1.2 began preserving output-copy failures, but Linux uses EIO to signal a normal PTY hangup. That made completed PTY commands look like execution failures with read /dev/ptmx: input/output error.

The existing PTY tests used ordinary pipes, which end with EOF and could not reproduce the kernel behavior. This keeps the stricter output-error handling while correctly separating terminal shutdown from an actual I/O failure.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cmilesio
cmilesio merged commit 2116e6e into main Jul 16, 2026
2 checks passed
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.

2 participants