View Issue Details

IDProjectCategoryView StatusLast Update
00005721003.1(2008)/Issue 7System Interfacespublic2019-06-10 08:55
Reportergeoffclare Assigned Toajosey  
PrioritynormalSeverityObjectionTypeError
Status ClosedResolutionAccepted As Marked 
NameGeoff Clare
OrganizationThe Open Group
User Reference
Sectiondirfd
Page Number723
Line Number24338
Interp StatusApproved
Final Accepted Textsee 0000572:0001247
Summary0000572: dirfd() ENOTSUP can never happen
DescriptionThe dirfd() page includes this optional error:

    [ENOTSUP] The implementation does not support the association of a
        file descriptor with a directory.

However, if open() is called with the pathname of a directory and with
the flag O_SEARCH, the standard requires it to return a file descriptor
that refers to the directory; therefore no conforming implementation
could ever meet the ENOTSUP condition.

Also, I can see no reason why dirfd() should be allowed not to set
errno when it returns -1. The proposed changes correct this by
changing "may" to "shall" in the RETURN VALUE section.

Finally, there is a misspelling of opendir() in the rationale.
Desired ActionAt line 24333 change:

    and may set errno

to:

    and shall set errno

At line 24338 delete the ENOTSUP error.

At line 24351 change "diropen()" to "opendir()".

At line 24354 delete:

    An implementation that does not support file descriptors referring
    to directories may fail with [ENOTSUP].
Tagstc2-2008

Relationships

related to 0000391 Closedajosey ENOTSUP should not be a valid error for dirfd() 

Activities

eblake

2012-05-31 15:50

manager   bugnote:0001247

Last edited: 2012-05-31 15:53

Interpretation response
------------------------
The standard states that implementations need not set errno, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor.

Rationale:
-------------
All implementations must support a file descriptor referring to a directory, even if that descriptor is not used by readdir(). Furthermore, failure of dirfd() without setting errno is not useful to applications.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
See Desired Action

ajosey

2012-06-29 16:14

manager   bugnote:0001284

Interpretation proposed 29 June 2012 for final 45 day review

ajosey

2012-08-30 09:12

manager   bugnote:0001347

Interpretation approved 30 Aug 2012

geoffclare

2015-09-16 10:31

manager   bugnote:0002828

Note that the RATIONALE change from diropen() to opendir() has already been done in the 2013 edition and so does not need to be included in TC2.

Issue History

Date Modified Username Field Change
2012-05-30 15:12 geoffclare New Issue
2012-05-30 15:12 geoffclare Status New => Under Review
2012-05-30 15:12 geoffclare Assigned To => ajosey
2012-05-30 15:12 geoffclare Name => Geoff Clare
2012-05-30 15:12 geoffclare Organization => The Open Group
2012-05-30 15:12 geoffclare Section => dirfd
2012-05-30 15:12 geoffclare Page Number => 723
2012-05-30 15:12 geoffclare Line Number => 24338
2012-05-30 15:12 geoffclare Interp Status => ---
2012-05-30 16:22 eblake Relationship added related to 0000391
2012-05-31 15:50 eblake Note Added: 0001247
2012-05-31 15:51 eblake Interp Status --- => Pending
2012-05-31 15:51 eblake Final Accepted Text => see 0000572:0001247
2012-05-31 15:51 eblake Status Under Review => Interpretation Required
2012-05-31 15:51 eblake Resolution Open => Accepted
2012-05-31 15:51 eblake Tag Attached: tc2-2008
2012-05-31 15:52 eblake Resolution Accepted => Accepted As Marked
2012-05-31 15:53 eblake Note Edited: 0001247
2012-06-29 16:14 ajosey Interp Status Pending => Proposed
2012-06-29 16:14 ajosey Note Added: 0001284
2012-08-30 09:12 ajosey Interp Status Proposed => Approved
2012-08-30 09:12 ajosey Note Added: 0001347
2015-09-16 10:31 geoffclare Note Added: 0002828
2019-06-10 08:55 agadmin Status Interpretation Required => Closed