use-pty #2

Merged
shawn_hurley merged 2 commits from use-pty into main 2026-04-24 10:51:16 -04:00
Owner
No description provided.
Goose and its child processes (e.g., claude-code) open /dev/tty directly,
causing SIGTTIN when running in a background process group. Replace
process_group(0) with setsid() + TIOCSCTTY on a PTY slave so the child
session has a real controlling terminal. This provides the same signal
isolation while giving /dev/tty a PTY to resolve to.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jason Montleon <jmontleo@redhat.com>
fix: drain goose stdout/stderr in background threads to prevent pipe deadlock
Some checks failed
CI / Check & Test (pull_request) Failing after 1m44s
a0de2df730
When goose output exceeds the OS pipe buffer (64KB), the child blocks in
write() waiting for buffer space while the parent blocks in try_wait()
waiting for exit — a classic pipe deadlock. Spawn reader threads that
continuously drain both pipes so the buffer never fills.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jason Montleon <jmontleo@redhat.com>
shawn_hurley referenced this pull request from a commit 2026-04-24 10:51:18 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
shawn_hurley/fix-engine!2
No description provided.