b87ef7772f
os.getlogin() returns the user logged in on the controlling terminal. However 'crontab' only looks for the login name of the process' real user id which pwd.getpwuid(os.getuid())[0] does provide. While in most cases there is no difference, the former might fail under certain circumstances (e.g. a lxc container connected by attachment without login), throwing the error 'OSError: [Errno 25] Inappropriate ioctl for device'. |
||
---|---|---|
.. | ||
ansible |