You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modules/posixmodule.c unconditionally adds O_CLOEXEC to the flags, but OpenBSD's posix_openpt(3) returns EINVAL for any flag other than O_RDWR and O_NOCTTY. The function already makes the fd non-inheritable with _Py_set_inheritable() immediately afterwards, so skip the O_CLOEXEC flag on OpenBSD.
Bug report
os.posix_openpt()is unusable on OpenBSD — every call fails:Modules/posixmodule.cunconditionally addsO_CLOEXECto the flags, but OpenBSD'sposix_openpt(3)returns EINVAL for any flag other thanO_RDWRandO_NOCTTY. The function already makes the fd non-inheritable with_Py_set_inheritable()immediately afterwards, so skip theO_CLOEXECflag on OpenBSD.Linked PRs