From 78e51a8c6678b6e3dff3d619aa786669f531f4bc Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 14 Jan 2005 03:45:44 +0000 Subject: checkpoint --- man/man3/getuser.html | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 man/man3/getuser.html (limited to 'man/man3/getuser.html') diff --git a/man/man3/getuser.html b/man/man3/getuser.html new file mode 100644 index 00000000..c34b23cf --- /dev/null +++ b/man/man3/getuser.html @@ -0,0 +1,75 @@ + +getuser(3) - Plan 9 from User Space + + + + +
+
+
GETUSER(3)GETUSER(3) +
+
+

NAME
+ +
+ + getuser, sysname – get user or system name
+ +
+

SYNOPSIS
+ +
+ + #include <u.h>
+ #include <libc.h> +
+
+ char*       getuser(void) +
+
+ char*       sysname(void)
+
+
+

DESCRIPTION
+ +
+ + Getuser returns a pointer to static data which contains the null-terminated + name of the user who owns the current process. Getuser calls getuid(2) + and then reads /etc/passwd to find the corresponding name. +
+ + Sysname returns a pointer to static data which contains the name + of the machine on which the current process is running. Sysname + looks first for an environment variable $sysname. If there is + no such variable, sysname calls gethostname(2) and truncates the + returned name at the first dot. If gethostname fails, + sysname returns the default name gnot. +
+ + Unlike getuser, sysname caches the string, deriving the host name + only once.
+ +
+

SOURCE
+ +
+ + /usr/local/plan9/src/lib9/getuser.c
+ /usr/local/plan9/src/lib9/sysname.c
+
+
+ +

+
+
+ + +
+
+
+Space Glenda +
+
+ + -- cgit v1.2.3