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 christian.heimes
Recipients Manickaraja Kumarappan, christian.heimes, mephinet
Date 2020-12-16.12:32:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1608121942.56.0.356099712775.issue40821@roundup.psfhosted.org>
In-reply-to
Content
errno 6 is ENXIO. According to https://www.man7.org/linux/man-pages/man3/getlogin.3.html the error code means "The calling process has no controlling terminal.".

os.getlogin() returns the name of the user logged in on the controlling terminal of the process. Typically processes in user session (tty, X session) have a controlling terminal. Processes spawned by a service manager like init, systemd, or upstart usually do not have a controlling terminal. You have to get the user information by other means. Our documentation for os.getlogin() recommends getpass.getuser().
History
Date User Action Args
2020-12-16 12:32:22christian.heimessetrecipients: + christian.heimes, mephinet, Manickaraja Kumarappan
2020-12-16 12:32:22christian.heimessetmessageid: <1608121942.56.0.356099712775.issue40821@roundup.psfhosted.org>
2020-12-16 12:32:22christian.heimeslinkissue40821 messages
2020-12-16 12:32:22christian.heimescreate