Skip to content

gh-154227: Fix os.posix_openpt() on OpenBSD#154228

Merged
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:posix-openpt-openbsd
Jul 20, 2026
Merged

gh-154227: Fix os.posix_openpt() on OpenBSD#154228
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:posix-openpt-openbsd

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 20, 2026

Copy link
Copy Markdown
Member

OpenBSD posix_openpt(3) rejects any flag other than O_RDWR and O_NOCTTY, so os.posix_openpt() always failed with EINVAL. Skip O_CLOEXEC on OpenBSD; the fd is made non-inheritable immediately afterwards in any case. Verified on OpenBSD 7.9.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip news and removed skip news labels Jul 20, 2026
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) July 20, 2026 08:21
@serhiy-storchaka
serhiy-storchaka merged commit d01b90c into python:main Jul 20, 2026
54 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-app

bedevere-app Bot commented Jul 20, 2026

Copy link
Copy Markdown

GH-154235 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 20, 2026
@bedevere-app

bedevere-app Bot commented Jul 20, 2026

Copy link
Copy Markdown

GH-154236 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 20, 2026
@bedevere-app

bedevere-app Bot commented Jul 20, 2026

Copy link
Copy Markdown

GH-154237 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 20, 2026
serhiy-storchaka added a commit that referenced this pull request Jul 20, 2026
…4237)

(cherry picked from commit d01b90c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Jul 20, 2026
…4235)

(cherry picked from commit d01b90c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Jul 20, 2026
…4236)

(cherry picked from commit d01b90c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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