Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000172 [1003.1(2008)/Issue 7] System Interfaces Objection Omission 2009-10-23 09:35 2013-04-16 13:06
Reporter geoffclare View Status public  
Assigned To ajosey
Priority normal Resolution Accepted As Marked  
Status Closed  
Name Geoff Clare
Organization The Open Group
User Reference
Section getlogin
Page Number 1029
Line Number 34464
Interp Status Approved
Final Accepted Text Note: 0000285
Summary 0000172: getlogin() and fds 0, 1 and 2
Description Most (possibly all) implementations of getlogin() rely internally on
file descriptor 0, 1 or 2 being open to the terminal in order to find
it. If all three fds are redirected, for example to plain files or
/dev/null, getlogin() fails (with ENOTTY). The standard does not
mention this.

This also affects the logname utility (via the reference to getlogin()
in its description).
Desired Action
At the end of the DESCRIPTION section add a new paragraph:

    The getlogin() and getlogin_r() functions may make use of file
    descriptors 0, 1 and 2 to find the controlling terminal of the
    current process, examining each in turn until the terminal is
    found.  If none of the three file descriptors is open to the
    controlling terminal, the functions may fail.  The method
    used to find the terminal associated with a file descriptor may
    depend on the file descriptor being open to the actual terminal
    device, not /dev/tty.

After line 34476 (ENFILE) add:

    [ENOTTY]    None of the file descriptors 0, 1 or 2 is open to the
                controlling terminal of the current process.

Tags tc1-2008
Attached Files

- Relationships

-  Notes
(0000285)
msbrown (manager)
2009-11-05 17:27
edited on: 2009-11-06 07:02

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):
-------------------------------------------------------

The Committee recommends the following changes:

At the end of the DESCRIPTION section add a new paragraph:

    The getlogin() and getlogin_r() functions may make use of file
    descriptors 0, 1 and 2 to find the controlling terminal of the
    current process, examining each in turn until the terminal is
    found.  If in this case none of these three file descriptors is open to the
    controlling terminal, these functions may fail.  The method
    used to find the terminal associated with a file descriptor may
    depend on the file descriptor being open to the actual terminal
    device, not /dev/tty.

After line 34476 (ENFILE) add:

    [ENOTTY]    None of the file descriptors 0, 1 or 2 is open to the
                controlling terminal of the current process.



- Issue History
Date Modified Username Field Change
2009-10-23 09:35 geoffclare New Issue
2009-10-23 09:35 geoffclare Status New => Under Review
2009-10-23 09:35 geoffclare Assigned To => ajosey
2009-10-23 09:35 geoffclare Name => Geoff Clare
2009-10-23 09:35 geoffclare Organization => The Open Group
2009-10-23 09:35 geoffclare Section => getlogin
2009-10-23 09:35 geoffclare Page Number => 1029
2009-10-23 09:35 geoffclare Line Number => 34464
2009-10-23 09:35 geoffclare Interp Status => ---
2009-11-05 17:27 msbrown Interp Status --- => Pending
2009-11-05 17:27 msbrown Note Added: 0000285
2009-11-05 17:27 msbrown Status Under Review => Interpretation Required
2009-11-05 17:27 msbrown Resolution Open => Accepted As Marked
2009-11-05 17:27 msbrown Final Accepted Text => Note: 0000285
2009-11-06 07:02 ajosey Note Edited: 0000285
2009-11-06 07:02 ajosey Interp Status Pending => Proposed
2009-12-07 16:54 ajosey Interp Status Proposed => Approved
2010-09-24 14:10 Don Cragun Tag Attached: tc1-2008
2013-04-16 13:06 ajosey Status Interpretation Required => Closed


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker