View Issue Details

IDProjectCategoryView StatusLast Update
00008081003.1(2013)/Issue7+TC1System Interfacespublic2019-06-10 08:55
Reportergeoffclare Assigned To 
PrioritynormalSeverityObjectionTypeOmission
Status ClosedResolutionAccepted 
NameGeoff Clare
OrganizationThe Open Group
User Reference
Sectiongetgrgid
Page Number1023
Line Number34587
Interp StatusApproved
Final Accepted TextSee 0000808:0002165
Summary0000808: getgrgid() missing requirement not to change errno
DescriptionThe application usage for getgrgid() advises that applications
should set errno to zero before the call in order to distinguish
between the "not found" case and an error. However, there is no
requirement in normative text that getgrgid() does not change
errno for the "not found" case.

The same applies to getgrnam().

For getpwnam() and getpwuid() the situation is a little different
because the advice to application writers about setting errno to
zero appears in normative text and clearly implies that errno is not
changed for the "not found" case. However, it would be better still
if this was stated directly.
Desired ActionOn page 1023 line 34587 section getgrgid,
page 1027 line 34718 section getgrnam,
page 1065 line 35887 section getpwnam,
page 1069 line 36023 section getpwuid change:

    On error, errno shall be set to indicate the error.

to:

    If the requested entry was not found, errno shall not be
    changed. On error, errno shall be set to indicate the error.

After page 1023 line 34576 section getgrgid add a new paragraph:

    Applications wishing to check for error situations should set
    errno to 0 before calling getgrgid(). If getgrgid() returns a
    null pointer and errno is set to non-zero, an error occurred.

On page 1025 line 34652 section getgrgid delete:

    Applications wishing to check for error situations should set
    errno to 0 before calling getgrgid(). If errno is set on return,
    an error occurred.

After page 1027 line 34707 section getgrnam add a new paragraph:

    Applications wishing to check for error situations should set
    errno to 0 before calling getgrnam(). If getgrnam() returns a
    null pointer and errno is set to non-zero, an error occurred.

On page 1028 line 34769 section getgrnam delete:

    Applications wishing to check for error situations should set
    errno to 0 before calling getgrnam(). If errno is set on return,
    an error occurred.
Tagstc2-2008

Relationships

related to 0000998 Resolved 2008-TC2 Missing some changes from bug 808 

Activities

nick

2014-02-27 16:51

manager   bugnote:0002165

Last edited: 2014-02-27 16:53

Interpretation response
------------------------

The standard does not speak to this issue, and as such no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor.

Rationale:
-------------
Application developers requiring to check for errors from these functions should set errno to zero before calling the function if they need to determine if an error occurred.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
See desired action.

ajosey

2014-02-28 10:20

manager   bugnote:0002170

Interpretation Proposed 28 Feb 2014

ajosey

2014-04-01 13:32

manager   bugnote:0002210

Interpretation approved 1 April 2014

Issue History

Date Modified Username Field Change
2013-12-05 10:24 geoffclare New Issue
2013-12-05 10:24 geoffclare Name => Geoff Clare
2013-12-05 10:24 geoffclare Organization => The Open Group
2013-12-05 10:24 geoffclare Section => getgrgid
2013-12-05 10:24 geoffclare Page Number => 1023
2013-12-05 10:24 geoffclare Line Number => 34587
2013-12-05 10:24 geoffclare Interp Status => ---
2014-02-27 16:51 nick Note Added: 0002165
2014-02-27 16:52 nick Interp Status --- => Pending
2014-02-27 16:52 nick Final Accepted Text => See 0000808:0002165
2014-02-27 16:52 nick Status New => Interpretation Required
2014-02-27 16:52 nick Resolution Open => Accepted
2014-02-27 16:52 nick Description Updated
2014-02-27 16:53 nick Note Edited: 0002165
2014-02-27 16:53 nick Tag Attached: tc2-2008
2014-02-28 10:20 ajosey Interp Status Pending => Proposed
2014-02-28 10:20 ajosey Note Added: 0002170
2014-04-01 13:32 ajosey Interp Status Proposed => Approved
2014-04-01 13:32 ajosey Note Added: 0002210
2015-11-05 19:01 rhansen Relationship added related to 0000998
2019-06-10 08:55 agadmin Status Interpretation Required => Closed