Message383161
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(). |
|
Date |
User |
Action |
Args |
2020-12-16 12:32:22 | christian.heimes | set | recipients:
+ christian.heimes, mephinet, Manickaraja Kumarappan |
2020-12-16 12:32:22 | christian.heimes | set | messageid: <1608121942.56.0.356099712775.issue40821@roundup.psfhosted.org> |
2020-12-16 12:32:22 | christian.heimes | link | issue40821 messages |
2020-12-16 12:32:22 | christian.heimes | create | |
|