Blob
1 .TH GETUSER 32 .SH NAME3 getuser, sysname \- get user or system name4 .SH SYNOPSIS5 .B #include <u.h>6 .br7 .B #include <libc.h>8 .PP9 .B10 char* getuser(void)11 .PP12 .B13 char* sysname(void)14 .SH DESCRIPTION15 .I Getuser16 returns a pointer to static data which contains the17 null-terminated18 name of the user who19 owns the current process.20 .I Getuser21 reads22 .B /dev/user23 to find the name.24 .PP25 .I Sysname26 provides the same service for the file27 .BR #c/sysname ,28 which contains the name of the machine.29 Unlike30 .IR getuser ,31 .I sysname32 caches the string, reading the file only once.33 .SH SOURCE34 .B /usr/local/plan9/src/libc/port/getuser.c35 .SH SEE ALSO36 .IR intro (3),37 .IR cons (3)