mirror of https://github.com/python/cpython
getuid() returns real process id not effective (closes #22307)
This commit is contained in:
parent
0cff49fcf9
commit
e218bcbf39
|
@ -281,10 +281,10 @@ process and user.
|
||||||
.. function:: getlogin()
|
.. function:: getlogin()
|
||||||
|
|
||||||
Return the name of the user logged in on the controlling terminal of the
|
Return the name of the user logged in on the controlling terminal of the
|
||||||
process. For most purposes, it is more useful to use the environment variables
|
process. For most purposes, it is more useful to use the environment
|
||||||
:envvar:`LOGNAME` or :envvar:`USERNAME` to find out who the user is, or
|
variables :envvar:`LOGNAME` or :envvar:`USERNAME` to find out who the user
|
||||||
``pwd.getpwuid(os.getuid())[0]`` to get the login name of the currently
|
is, or ``pwd.getpwuid(os.getuid())[0]`` to get the login name of the current
|
||||||
effective user id.
|
real user id.
|
||||||
|
|
||||||
Availability: Unix, Windows.
|
Availability: Unix, Windows.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue