📄 getlogin.3
字号:
.\" SCCSID: @(#)getlogin.3 8.1 9/11/90.TH getlogin 3 .SH Namegetlogin \- get login name.SH Syntax.B char *getlogin().SH Description.NXR "getlogin subroutine".NXR "login name" "getting"The.PN getloginsubroutinereturns a pointer to the login name as found in .PN /etc/utmp .It may be used in conjunction with.PN getpwnamto locate the correct password file entry when the same useridis shared by several login names..PPIf.PN getloginis called within a process that is not attached to atypewriter, it returns NULL.The correct procedure for determining the login name is to first call.PN getloginand if it fails, to call.PN getpw ( .PN getuid)..SH RestrictionsThe return values point to static datawhose content is overwritten by each call..SH Return ValuesReturns NULL (0) if name not found..SH Files/etc/utmp.SH See Alsogetgrent(3), getpw(3), getpwent(3), utmp(5)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -