'\" te .\" Copyright 1989 AT&T Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH CUSERID 3C "Dec 30, 1996" .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 box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ MT-Level MT-Safe .TE .SH SEE ALSO .sp .LP \fBgetlogin\fR(3C), \fBgetpwnam\fR(3C), \fBattributes\fR(5)