Skip to content

Set close-on-exec on the background pty - #58

Merged
LudaLunizz merged 1 commit into
Silvertree2010:mainfrom
LudaLunizz:pty-cloexec
Nov 21, 2026
Merged

LudaLunizz merged 1 commit into
Silvertree2010:mainfrom
LudaLunizz:pty-cloexec

Conversation

@LudaLunizz

Copy link
Copy Markdown
Collaborator

openpty returns descriptors without FD_CLOEXEC, so every child started while a pty background runs (claude and its tool shells, openers, git) inherited both ends of that pty and kept them open.

Both ends now get FD_CLOEXEC right after openpty; the pty child still gets its copy through the dup'd stdio.

🤖 Generated with Claude Code

openpty returns descriptors without FD_CLOEXEC, so every child started
while a pty background runs (claude and its tool shells, openers, git)
inherited both ends of that pty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 21, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 45135a6a-8963-43aa-88fc-1657c9b8e51a
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@LudaLunizz
LudaLunizz merged commit 85e4753 into Silvertree2010:main Nov 21, 2026
5 checks passed
@LudaLunizz
LudaLunizz deleted the pty-cloexec branch November 27, 2026 19:24
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.

1 participant