View Issue Details

IDProjectCategoryView StatusLast Update
00004181003.1(2008)/Issue 7System Interfacespublic2013-04-16 13:06
Reportergeoffclare Assigned Toajosey  
PrioritynormalSeverityObjectionTypeError
Status ClosedResolutionAccepted 
NameGeoff Clare
OrganizationThe Open Group
User Reference
Sectionposix_spawn_file_actions_addclose
Page Number1430
Line Number46893-46895
Interp StatusApproved
Final Accepted Textsee 0000418:0000801
Summary0000418: posix_spawn_file_actions_addclose() should not check against OPEN_MAX
DescriptionOn some systems there can be file descriptors open that are greater
than or equal to {OPEN_MAX} (if {OPEN_MAX} is reduced after they were
opened). These need to be able to be closed on spawn, therefore
posix_spawn_file_actions_addclose() should not be required to check
against {OPEN_MAX}.
Desired ActionChange:

    These functions shall fail if:

    [EBADF]
        The value specified by fildes is negative or greater than or
        equal to {OPEN_MAX}.

to:

    The posix_spawn_file_actions_addopen() function shall fail if:

    [EBADF]
        The value specified by fildes is negative or greater than or
        equal to {OPEN_MAX}.

    The posix_spawn_file_actions_addclose() function shall fail if:

    [EBADF]
        The value specified by fildes is negative.

After line 46954 add a new paragraph to the end of RATIONALE:

    The posix_spawn_file_actions_addclose() function is not required
    to check whether the file descriptor is less than {OPEN_MAX}
    because on some implementations {OPEN_MAX} reflects the
    RLIMIT_NOFILE soft limit and therefore calling setrlimit() to
    reduce this limit can result in an {OPEN_MAX} value less than
    or equal to an already open file descriptor. Applications need
    to be able to close such file descriptors on spawn. On
    implementations where {OPEN_MAX} does not change, it is
    recommended that posix_spawn_file_actions_addclose() should
    return EBADF if fildes is greater than or equal to {OPEN_MAX}.
Tagstc1-2008

Relationships

related to 0000370 Closedajosey addclose should not cause posix_spawn to fail if closing an already closed fd 

Activities

eblake

2011-06-02 16:16

manager   bugnote:0000801

Last edited: 2011-06-02 16:17

Interpretation response:
------------------------
The standard states that posix_spawn_file_actions_addclose must fail if the argument exceeds OPEN_MAX, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor.

Rationale:
----------
See Description.

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

ajosey

2011-06-16 10:17

manager   bugnote:0000850

Interpretation proposed 16 June 2011 for final 30 day review

ajosey

2011-07-29 06:13

manager   bugnote:0000902

The interpretation is now approved.

Issue History

Date Modified Username Field Change
2011-04-28 09:32 geoffclare New Issue
2011-04-28 09:32 geoffclare Status New => Under Review
2011-04-28 09:32 geoffclare Assigned To => ajosey
2011-04-28 09:32 geoffclare Name => Geoff Clare
2011-04-28 09:32 geoffclare Organization => The Open Group
2011-04-28 09:32 geoffclare Section => posix_spawn_file_actions_addclose
2011-04-28 09:32 geoffclare Page Number => 1430
2011-04-28 09:32 geoffclare Line Number => 46893-46895
2011-04-28 09:32 geoffclare Interp Status => ---
2011-06-02 16:10 eblake Relationship added related to 0000370
2011-06-02 16:16 eblake Note Added: 0000801
2011-06-02 16:16 eblake Interp Status --- => Pending
2011-06-02 16:16 eblake Final Accepted Text => see 0000418:0000801
2011-06-02 16:16 eblake Status Under Review => Interpretation Required
2011-06-02 16:16 eblake Resolution Open => Accepted
2011-06-02 16:16 eblake Description Updated
2011-06-02 16:16 eblake Desired Action Updated
2011-06-02 16:17 eblake Note Edited: 0000801
2011-06-02 16:18 eblake Tag Attached: tc1-2008
2011-06-16 10:17 ajosey Interp Status Pending => Proposed
2011-06-16 10:17 ajosey Note Added: 0000850
2011-07-29 06:13 ajosey Interp Status Proposed => Approved
2011-07-29 06:13 ajosey Note Added: 0000902
2013-04-16 13:06 ajosey Status Interpretation Required => Closed