View Issue Details

IDProjectCategoryView StatusLast Update
00001431003.1(2008)/Issue 7System Interfacespublic2013-04-16 13:06
Reportereblake Assigned Toajosey  
PrioritynormalSeverityObjectionTypeError
Status ClosedResolutionAccepted 
NameEric Blake
OrganizationN/A
User Referenceebb.readlinkat
Sectionreadlink
Page Number1749
Line Number55865
Interp StatusApproved
Final Accepted Text0000143:0000234
Summary0000143: readlinkat return value
DescriptionThe standard says that readlinkat returns 0 on success, rather than the resulting buffer length. This is a gratuitous difference from readlink, and makes the interface impossible to use (the standard is clear that the buffer of readlink() need not be NULL-terminated, so an application can't even trust strlen() after readlinkat). It also disagrees with implementation practice.
Desired ActionReplace the two paragraphs at 55865-55869:

Upon successful completion, readlink( ) shall return the count of bytes placed in the buffer. Otherwise, it shall return a value of −1, leave the buffer unchanged, and set errno to indicate the error.
Upon successful completion, the readlinkat( ) function shall return 0. Otherwise, it shall return −1 and set errno to indicate the error.

with one paragraph:

Upon successful completion, these functions shall return the count of bytes placed in the buffer. Otherwise, these functions shall return a value of −1, leave the buffer unchanged, and set errno to indicate the error.
Tagstc1-2008

Activities

ajosey

2009-09-17 16:17

manager   bugnote:0000234

Interpretation response
------------------------
The standard states the requirements for readlinkat()
and conforming implementations must conform to this. However, concerns
have been raised about this which are being referred to the sponsor.

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

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

Make changes as suggested by the submitter

Issue History

Date Modified Username Field Change
2009-09-05 14:03 eblake New Issue
2009-09-05 14:03 eblake Status New => Under Review
2009-09-05 14:03 eblake Assigned To => ajosey
2009-09-05 14:03 eblake Name => Eric Blake
2009-09-05 14:03 eblake Organization => N/A
2009-09-05 14:03 eblake User Reference => ebb.readlinkat
2009-09-05 14:03 eblake Section => readlink
2009-09-05 14:03 eblake Page Number => 1749
2009-09-05 14:03 eblake Line Number => 55865
2009-09-17 16:17 ajosey Interp Status => Pending
2009-09-17 16:17 ajosey Note Added: 0000234
2009-09-17 16:17 ajosey Status Under Review => Interpretation Required
2009-09-17 16:17 ajosey Resolution Open => Accepted
2009-09-17 16:18 ajosey Final Accepted Text => 0000143:0000234
2009-11-07 07:33 ajosey Interp Status Pending => Proposed
2009-12-07 16:56 ajosey Interp Status Proposed => Approved
2010-09-21 11:14 geoffclare Tag Attached: tc1-2008
2013-04-16 13:06 ajosey Status Interpretation Required => Closed