Message32464
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. |
|
Date |
User |
Action |
Args |
2007-08-23 14:58:25 | admin | link | issue1750013 messages |
2007-08-23 14:58:25 | admin | create | |
|