Skip to content

fix: set close-on-exec on pty fds in the parent process - #986

Open
Nick Darvey (NickDarvey) wants to merge 1 commit into
microsoft:mainfrom
NickDarvey:fix/master-fd-cloexec
Open

Nick Darvey (NickDarvey) wants to merge 1 commit into
microsoft:mainfrom
NickDarvey:fix/master-fd-cloexec

Conversation

@NickDarvey

Copy link
Copy Markdown

The master from forkpty and posix_openpt, and the master and slave from openpty, had no FD_CLOEXEC flag. Each process the host spawned later inherited the fds of all open terminals.

The master from forkpty and posix_openpt, and the master and slave from
openpty, had no FD_CLOEXEC flag. Each process the host spawned later
inherited the fds of all open terminals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RWxuaKXi4UMzaXW8C5Yuv
@NickDarvey Nick Darvey (NickDarvey) changed the title Set close-on-exec on pty fds in the parent process fix: set close-on-exec on pty fds in the parent process Oct 5, 2026
@NickDarvey

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@NickDarvey
Nick Darvey (NickDarvey) marked this pull request as ready for review October 6, 2026 19:50
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