'\" te .\" Copyright 1989 AT&T Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved .TH cuserid 3C "30 Dec 1996" "SunOS 5.11" "Standard C Library Functions" .SH NAME cuserid \- get character login name of the user .SH SYNOPSIS .LP .nf #include \fBchar *\fR\fBcuserid\fR(\fBchar *\fR\fIs\fR); .fi .SH DESCRIPTION .sp .LP The \fBcuserid()\fR function generates a character-string representation of the login name under which the owner of the current process is logged in. If \fIs\fR is a null pointer, this representation is generated in an internal static area whose address is returned. Otherwise, \fIs\fR is assumed to point to an array of at least \fBL_cuserid\fR characters; the representation is left in this array. The constant \fBL_cuserid\fR is defined in the <\fBstdio.h\fR> header. .sp .LP In multithreaded applications, the caller must always supply an array \fIs\fR for the return value. .SH RETURN VALUES .sp .LP If the login name cannot be found, \fBcuserid()\fR returns a null pointer. If \fIs\fR is not a null pointer, the null character \fB`\e0'\fR will be placed at \fIs\fR[\fB0\fR]. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ MT-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBgetlogin\fR(3C), \fBgetpwnam\fR(3C), \fBattributes\fR(5)