1 '\" te
2 .\" Copyright 1989 AT&T. Copyright (c) 2004 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 GETUTXENT 3C "Jul 27, 2004"
7 .SH NAME
8 getutxent, getutxid, getutxline, pututxline, setutxent, endutxent, utmpxname,
9 getutmp, getutmpx, updwtmp, updwtmpx \- user accounting database functions
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <utmpx.h>
14
15 \fBstruct utmpx *\fR\fBgetutxent\fR(\fBvoid\fR);
16 .fi
17
18 .LP
19 .nf
20 \fBstruct utmpx *\fR\fBgetutxid\fR(\fBconst struct utmpx *\fR\fIid\fR);
21 .fi
22
23 .LP
24 .nf
25 \fBstruct utmpx *\fR\fBgetutxline\fR(\fBconst struct utmpx *\fR\fIline\fR);
26 .fi
218 values \fBinit\fR uses. Applications creating \fButmpx\fR entries can set
219 \fBut_exit\fR values using the following code example:
220 .sp
221 .in +2
222 .nf
223 u->ut_exit.e_termination = WTERMSIG(process->p_exit)
224 u->ut_exit.e_exit = WEXITSTATUS(process->p_exit)
225 .fi
226 .in -2
227
228 .sp
229 .LP
230 See \fBwait.h\fR(3HEAD) for descriptions of the \fBWTERMSIG\fR and
231 \fBWEXITSTATUS\fR macros.
232 .sp
233 .LP
234 The \fBut_session\fR member is not acted upon by the operating system. It is
235 used by applications interested in creating \fButmpx\fR entries.
236 .sp
237 .LP
238 For records of type \fBUSER_PROCESS\fR, the \fBnonuser()\fR and
239 \fBnonuserx()\fR macros use the value of the \fBut_exit.e_exit\fR member to
240 mark \fButmpx\fR entries as real logins (as opposed to multiple xterms started
241 by the same user on a window system). This allows the system utilities that
242 display users to obtain an accurate indication of the number of actual users,
243 while still permitting each \fBpty\fR to have a \fButmpx\fR record (as most
244 applications expect.). The \fBNONROOT_USER\fR macro defines the value that
245 \fBlogin\fR places in the \fBut_exit.e_exit\fR member.
246 .SH RETURN VALUES
247 .sp
248 .LP
249 Upon successful completion, \fBgetutxent()\fR, \fBgetutxid()\fR, and
250 \fBgetutxline()\fR each return a pointer to a \fButmpx\fR structure containing
251 a copy of the requested entry in the user accounting database. Otherwise a
252 null pointer is returned.
253 .sp
254 .LP
255 The return value may point to a static area which is overwritten by a
256 subsequent call to \fBgetutxid ()\fR or \fBgetutxline()\fR.
257 .sp
258 .LP
259 Upon successful completion, \fBpututxline()\fR returns a pointer to a
260 \fButmpx\fR structure containing a copy of the entry added to the user
261 accounting database. Otherwise a null pointer is returned.
262 .sp
263 .LP
264 The \fBendutxent()\fR and \fBsetutxent()\fR functions return no value.
265 .sp
|
1 '\" te
2 .\" Copyright 1989 AT&T. Copyright (c) 2004 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 GETUTXENT 3C "Nov 21, 2014"
7 .SH NAME
8 getutxent, getutxid, getutxline, pututxline, setutxent, endutxent, utmpxname,
9 getutmp, getutmpx, updwtmp, updwtmpx \- user accounting database functions
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <utmpx.h>
14
15 \fBstruct utmpx *\fR\fBgetutxent\fR(\fBvoid\fR);
16 .fi
17
18 .LP
19 .nf
20 \fBstruct utmpx *\fR\fBgetutxid\fR(\fBconst struct utmpx *\fR\fIid\fR);
21 .fi
22
23 .LP
24 .nf
25 \fBstruct utmpx *\fR\fBgetutxline\fR(\fBconst struct utmpx *\fR\fIline\fR);
26 .fi
218 values \fBinit\fR uses. Applications creating \fButmpx\fR entries can set
219 \fBut_exit\fR values using the following code example:
220 .sp
221 .in +2
222 .nf
223 u->ut_exit.e_termination = WTERMSIG(process->p_exit)
224 u->ut_exit.e_exit = WEXITSTATUS(process->p_exit)
225 .fi
226 .in -2
227
228 .sp
229 .LP
230 See \fBwait.h\fR(3HEAD) for descriptions of the \fBWTERMSIG\fR and
231 \fBWEXITSTATUS\fR macros.
232 .sp
233 .LP
234 The \fBut_session\fR member is not acted upon by the operating system. It is
235 used by applications interested in creating \fButmpx\fR entries.
236 .sp
237 .LP
238 For records of type \fBUSER_PROCESS\fR, the \fBnonuserx()\fR macro uses
239 value of the \fBut_exit.e_exit\fR member to mark \fButmpx\fR entries as real
240 logins (as opposed to multiple xterms started by the same user on a window
241 system). This allows the system utilities that display users to obtain an
242 accurate indication of the number of actual users, while still permitting each
243 \fBpty\fR to have a \fButmpx\fR record (as most applications expect). The
244 \fBNONROOT_USRX\fR macro defines the value that \fBlogin\fR places in the
245 \fBut_exit.e_exit\fR member.
246 .SH RETURN VALUES
247 .sp
248 .LP
249 Upon successful completion, \fBgetutxent()\fR, \fBgetutxid()\fR, and
250 \fBgetutxline()\fR each return a pointer to a \fButmpx\fR structure containing
251 a copy of the requested entry in the user accounting database. Otherwise a
252 null pointer is returned.
253 .sp
254 .LP
255 The return value may point to a static area which is overwritten by a
256 subsequent call to \fBgetutxid ()\fR or \fBgetutxline()\fR.
257 .sp
258 .LP
259 Upon successful completion, \fBpututxline()\fR returns a pointer to a
260 \fButmpx\fR structure containing a copy of the entry added to the user
261 accounting database. Otherwise a null pointer is returned.
262 .sp
263 .LP
264 The \fBendutxent()\fR and \fBsetutxent()\fR functions return no value.
265 .sp
|