View Issue Details

IDProjectCategoryView StatusLast Update
00019791003.1(2024)/Issue8System Interfacespublic2026-05-21 15:34
Reporterphilip-guenther Assigned To 
PrioritynormalSeverityEditorialTypeClarification Requested
Status Interpretation RequiredResolutionAccepted As Marked 
NamePhilip Guenther
OrganizationOpenBSD
User Reference
Sectionopen
Page Number~1515-1518
Line Number~50743-50874
Interp StatusPending
Final Accepted Textsee 0001979:0007430
Summary0001979: conflicting specification for open("existing-directory", O_RDONLY | O_CREAT, 0644)
DescriptionThe description of open() explains O_CREAT with a paragraph that starts:

O_CREAT If the file exists, this flag has no effect except as noted under O_EXCL below. <...>

'file' is of course the XBD 'file' which includes directories, devices, etc. So, open(O_RDONLY|O_CREAT) naming a directory that exists should behave the same as open(O_RDONLY) of that same path.

Then later the ERRORS section contradicts that:

[EISDIR] The named file is a directory and oflag includes O_WRONLY or O_RDWR, or
                  includes O_CREAT without O_DIRECTORY, or <...>
Desired ActionAdjust the description of O_CREAT to remove the contradiction.
Tagstc1-2024

Activities

nick

2026-05-21 15:32

manager   bugnote:0007430

Interpretation response
------------------------
The standard is unclear on this issue, and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor.

Rationale:
-------------
None

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
Proposed Text:
On Line 50738, on Page 1515, of section open()
Change
O_CREAT If the file exists, this flag has no effect except as noted under O_EXCL below.

to
O_CREAT If path names an existing file, this flag has no effect except as noted under O_DIRECTORY and O_EXCL below.

Issue History

Date Modified Username Field Change
2026-04-05 05:13 philip-guenther New Issue
2026-05-21 15:32 nick Status New => Interpretation Required
2026-05-21 15:32 nick Resolution Open => Accepted As Marked
2026-05-21 15:32 nick Interp Status => ---
2026-05-21 15:32 nick Note Added: 0007430
2026-05-21 15:33 nick Final Accepted Text => see 0001979:0007430
2026-05-21 15:33 nick Tag Attached: tc1-2024
2026-05-21 15:34 nick Interp Status --- => Pending