Print this page
14249 pseudo-terminal nomenclature should reflect POSIX
Change-Id: Ib4a3cef899ff4c71b09cb0dc6878863c5e8357bc
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3utempter/utempter_add_record.3utempter.man.txt
+++ new/usr/src/man/man3utempter/utempter_add_record.3utempter.man.txt
1 1 UTEMPTER_ADD_RECORD(3UTEMPTER) UTEMPTER Library Functions
2 2
3 3 NAME
4 4 utempter_add_record, utempter_remove_added_record,
5 5 utempter_remove_record, addToUtmp, removeFromUtmp, removeLineFromUtmp -
6 6 utempter compatibility interface
7 7
8 8 LIBRARY
9 9 UTEMPTER Library (libutempter, -lutempter)
10 10
11 11 SYNOPSIS
12 12 #include <utempter.h>
13 13
14 14 int
15 15 utempter_add_record(int fd, const char *host);
16 16
17 17 int
18 18 utempter_remove_added_record(void);
19 19
20 20 int
21 21 utempter_remove_record(int fd);
22 22
23 23 void
24 24 addToUtmp(const char *pty, const char *host, int fd);
25 25
26 26 void
27 27 removeFromUtmp(void);
28 28
29 29 void
30 30 removeLineFromUtmp(const char *pty, int fd);
↓ open down ↓ |
30 lines elided |
↑ open up ↑ |
31 31
32 32 DESCRIPTION
33 33 These functions provide an interface for terminal emulators such as tmux,
34 34 screen, and xterm to record user sessions to utmpx(4) database. Note
35 35 that they are best effort and may not succeed. If consumers need to know
36 36 for certain that they have successfully updated the utmpx(4) database,
37 37 these functions should not be used because they cannot communicate that
38 38 for compatibility reasons.
39 39
40 40 The utempter_add_record() and addToUtmp() functions add a login record to
41 - the utmpx(4) database for the TTY belonging to the pseudo-terminal master
42 - file descriptor fd, using the username corresponding with the real user
43 - ID of the calling process and the optional hostname host, limited to 256
44 - characters, that is the size of ut_host member of struct utmpx minus
45 - terminating NUL character.
41 + the utmpx(4) database for the TTY belonging to the pseudo-terminal
42 + manager file descriptor fd, using the username corresponding with the
43 + real user ID of the calling process and the optional hostname host,
44 + limited to 256 characters, that is the size of ut_host member of struct
45 + utmpx minus terminating NUL character.
46 46
47 47 The utempter_remove_record() and removeLineFromUtmp() functions mark the
48 48 login session as being closed for the TTY belonging to the pseudo-
49 - terminal master file descriptor fd.
49 + terminal manager file descriptor fd.
50 50
51 51 The utempter_remove_added_record() and removeFromUtmp() functions have
52 52 the same properties as the previously mentioned functions, except that
53 53 they use an internally cached value of the file descriptor passed to
54 54 utempter_add_record() and addToUtmp().
55 55
56 56 In this implementation, the pty arguments of addToUtmp() and
57 57 removeLineFromUtmp() are ignored, and database entries are driven
58 58 entirely by the fd argument.
59 59
60 60 RETURN VALUES
61 61 The utempter_add_record(), utempter_remove_added_record() and
62 62 utempter_remove_record() functions always return a value of 0.
63 63
64 64 INTERFACE STABILITY
↓ open down ↓ |
5 lines elided |
↑ open up ↑ |
65 65 utempter_add_record(), utempter_remove_added_record(), and
66 66 utempter_remove_record() are Committed. addToUtmp(), removeFromUtmp(),
67 67 and removeLineFromUtmp() are Obsolete Committed.
68 68
69 69 MT-LEVEL
70 70 Unsafe
71 71
72 72 SEE ALSO
73 73 pututxline(3c), utmpx(3head), utmpx(4)
74 74
75 -illumos May 5, 2020 illumos
75 +illumos February 5, 2022 illumos
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX