nightly: remove unused BINARCHIVE
[unleashed.git] / share / man / man3c / cuserid.3c
blob5785756c66d166c09801b63d21a8585e788bdc09
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 1997, Sun Microsystems, Inc.  All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH CUSERID 3C "Dec 30, 1996"
7 .SH NAME
8 cuserid \- get character login name of the user
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <stdio.h>
14 \fBchar *\fR\fBcuserid\fR(\fBchar *\fR\fIs\fR);
15 .fi
17 .SH DESCRIPTION
18 .sp
19 .LP
20 The \fBcuserid()\fR function generates a character-string representation of the
21 login name under which the owner of the current process is logged in. If
22 \fIs\fR is a null pointer, this representation is generated in an internal
23 static area whose address is returned. Otherwise, \fIs\fR is assumed to point
24 to an array of at least \fBL_cuserid\fR characters; the representation is left
25 in this array. The constant \fBL_cuserid\fR is defined in the <\fBstdio.h\fR>
26 header.
27 .sp
28 .LP
29 In multithreaded applications, the caller must always supply an array \fIs\fR
30 for the return value.
31 .SH RETURN VALUES
32 .sp
33 .LP
34 If the login name cannot be found, \fBcuserid()\fR returns a null pointer.  If
35 \fIs\fR is not a null pointer, the null character \fB`\e0'\fR will be placed at
36 \fIs\fR[\fB0\fR].
37 .SH ATTRIBUTES
38 .sp
39 .LP
40 See \fBattributes\fR(5) for descriptions of the following attributes:
41 .sp
43 .sp
44 .TS
45 box;
46 c | c
47 l | l .
48 ATTRIBUTE TYPE  ATTRIBUTE VALUE
50 MT-Level        MT-Safe
51 .TE
53 .SH SEE ALSO
54 .sp
55 .LP
56 \fBgetlogin\fR(3C), \fBgetpwnam\fR(3C), \fBattributes\fR(5)