WG15 Defect Report Ref: 9945-1-amd2-01
Topic: Get User Name

This is an approved interpretation of 9945-1-amd2-1995.


Last update: 1997-05-20

                                        9945-1-amd2-95  #1


     Defect Report Number:    XXXX
     Topic: Get User Name 
     Relevant Sections: 4.2.4, 4.7.2

Defect Report:

     Date: Tue, 19 Sep 1995 06:46:10 -0700
     From: John.Zolnowsky@Eng.Sun.COM (John Zolnowsky-Reeltime)

I am referring to sections 4.2.4 (Get User Name) and 4.7.2 (Determine 
Terminal Device Name).  POSIX.1c is ambiguous when getlogin_r() and 
ttyname_r() cannot find the login or tty name, requiring that an error 
code is to be returned but not identifying a specific error code. 
Since the standard fails to specify a return code, applications cannot 
expect to portably handle this condition.

Is this an oversight in the specification?  I suggest that ESRCH should 
be the error returned these functions cannot find a name.

                         John Zolnowsky

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.

The standard is silent on what err shall be returned and the interpretations 
committee belives that the silence is intentional. Strictly conforming 
implementations are not constrainted in what they may return and applications 
shall be ready to deal with varying behaviors.

Forwarded to Interpretations group: Jan 3 1996
Completed: Feb 12 1996