On Wed, Feb 05, 2020 at 05:48:41PM -0700, Todd C. Miller wrote: > On Wed, 05 Feb 2020 15:47:37 -0600, joshua stein wrote: > > > The spec says the behavior of anything other than O_RDWR and > > O_NOCTTY is unspecified, but FreeBSD allows passing O_CLOEXEC. > > OK, but the manual needs to specify that O_CLOEXEC support is an > extension. E.g., under STANDARDS: > > The ability to use > .Dv O_CLOEXEC > is an extension to that standard. > > - todd
FWIW, it looks like a future standard version/revision will add O_CLOEXEC to posix_openpt. See https://www.austingroupbugs.net/view.php?id=411 (grep for posix_openpt, which is included among many other similar modifications). I haven't yet figured out the rules for that group and how things wind up in the published standard; what counts as a defect and what counts as a new feature. I'm a little surprised it's not already in the -2017 revision. IIRC, some other changes related to O_CLOEXEC/FD_CLOEXEC consistency made it into -2017 and earlier revisions.