summaryrefslogtreecommitdiffstats
path: root/man5/utmp.5
diff options
context:
space:
mode:
Diffstat (limited to 'man5/utmp.5')
-rw-r--r--man5/utmp.525
1 files changed, 14 insertions, 11 deletions
diff --git a/man5/utmp.5 b/man5/utmp.5
index f79e33e6a..4a0296409 100644
--- a/man5/utmp.5
+++ b/man5/utmp.5
@@ -8,7 +8,7 @@
.\" Modified 1996-07-20 by Michael Haardt
.\" Modified 1997-07-02 by Nicolás Lichtmaier <nick@debian.org>
.\" Modified 2004-10-31 by aeb, following Gwenole Beauchesne
-.TH utmp 5 2023-02-05 "Linux man-pages 6.03"
+.TH utmp 5 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
utmp, wtmp \- login records
.SH SYNOPSIS
@@ -44,7 +44,7 @@ around; details depend on the version of libc):
.in +4n
.EX
/* Values for ut_type field, below */
-
+\&
#define EMPTY 0 /* Record does not contain valid info
(formerly known as UT_UNKNOWN on Linux) */
#define RUN_LVL 1 /* Change in system run\-level (see
@@ -59,16 +59,16 @@ around; details depend on the version of libc):
#define USER_PROCESS 7 /* Normal process */
#define DEAD_PROCESS 8 /* Terminated process */
#define ACCOUNTING 9 /* Not implemented */
-
+\&
#define UT_LINESIZE 32
#define UT_NAMESIZE 32
#define UT_HOSTSIZE 256
-
+\&
struct exit_status { /* Type for ut_exit, below */
short e_termination; /* Process termination status */
short e_exit; /* Process exit status */
};
-
+\&
struct utmp {
short ut_type; /* Type of record */
pid_t ut_pid; /* PID of login process */
@@ -96,13 +96,13 @@ struct utmp {
long ut_session; /* Session ID */
struct timeval ut_tv; /* Time entry was made */
#endif
-
+\&
int32_t ut_addr_v6[4]; /* Internet address of remote
host; IPv4 address uses
just ut_addr_v6[0] */
char __unused[20]; /* Reserved for future use */
};
-
+\&
/* Backward compatibility hacks */
#define ut_name ut_user
#ifndef _NO_UT_TIME
@@ -176,7 +176,8 @@ with null bytes.
and other terminal emulators directly create a
\fBUSER_PROCESS\fP record and generate the \fIut_id\fP by using the
string that suffix part of the terminal name (the characters
-following \fI/dev/[pt]ty\fP).
+following
+.IR /dev/ [pt] ty ).
If they find a \fBDEAD_PROCESS\fP for this ID,
they recycle it, otherwise they create a new entry.
If they can, they
@@ -217,7 +218,7 @@ removed, record-keeping is turned off.
.I /var/run/utmp
.br
.I /var/log/wtmp
-.SH STANDARDS
+.SH VERSIONS
POSIX.1 does not specify a
.I utmp
structure, but rather one named
@@ -242,7 +243,9 @@ Linux defines the
structure to be the same as the
.I utmp
structure.
-.SS Comparison with historical systems
+.SH STANDARDS
+Linux.
+.SH HISTORY
Linux utmp entries conform neither to v7/BSD nor to System V; they are a
mix of the two.
.PP
@@ -313,7 +316,7 @@ the following method of setting this field is recommended:
.EX
struct utmp ut;
struct timeval tv;
-
+\&
gettimeofday(&tv, NULL);
ut.ut_tv.tv_sec = tv.tv_sec;
ut.ut_tv.tv_usec = tv.tv_usec;