cuserid.3s

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3S 代码 · 共 60 行

3S
60
字号
.\" SCCSID: @(#)cuserid.3s	8.1	9/11/90.TH cuserid 3s.SH Namecuserid \- get character login name of the user.SH Syntax#include <stdio.h>.PPchar \(**cuserid (s).brchar \(**s;.SH Description.NXR "cuserid subroutine".NXA "cuserid subroutine" "getlogin subroutine".NXR "login name" "getting character-string representation"The.PN cuseridsubroutinegenerates a character-string representation of the loginname of the owner of the current process.If.I s\^is a NULLpointer, this representation is generated in aninternal static area, the address of which is returned.Otherwise,.I s\^is assumed to point to an array of at least.PN L_cuseridcharacters; the representation is left in this array.The constant.PN L_cuseridis defined in the <stdio.h> header file..SH Return ValuesIf the login name cannot be found,.PN cuseridreturns a NULLpointer; if .I s\^is not a NULLpointer, a null character(\e0)will be placed ats[0]..PPIn POSIX mode, if .I s\^is not a NULL pointer, .I s\^is the return value..SH EnvironmentWhen your program is compiled using the POSIX environment,.PN cuseridreturns the name associated with the effective userid of the callingprocess.  When compiled in the BSD or System V environments, it returnsthe name associated with the login activity on the controlling terminal,if any.  Otherwise, it returns the same as in the POSIX environment..SH See Alsogetlogin(3), getpwent(3)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?