This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients
Date 2007-07-10.08:45:31
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
os.getlogin is a wrapper around the getlogin(3) POSIX function. It is important that Python exposes the function as-is, rather than trying to be more clever than the operating system designers. getlogin(3) is specified as "getlogin()  returns a pointer to a string containing the name of the user logged in on the controlling terminal of the process, or a null pointer if this information cannot be determined." See the man page for the precise list of error conditions; ENOENT is returned if there is no utmp entry.

Whether konsole is correct in not listing the controlling terminal in utmp, I don't know. Notice that xterm (which should be considered an authority in such matters) *does* create an utmp entry.

It's not clear to me how DISPLAY could be used at all, but even if it could, using it here would be incorrect.

Closing as invalid.
History
Date User Action Args
2007-08-23 14:58:25adminlinkissue1750013 messages
2007-08-23 14:58:25admincreate