summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/getutxent.3
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2010-01-22 05:09:10 +0000
committered <ed@FreeBSD.org>2010-01-22 05:09:10 +0000
commita14af867093d4252dca678cc2623ff485f5fcf3d (patch)
tree4e921255cf5820f106bd27508f9adbaf23f7a85a /lib/libc/gen/getutxent.3
parente175594ed6eabbf2370dbe1493450a8ed3cd965d (diff)
downloadFreeBSD-src-a14af867093d4252dca678cc2623ff485f5fcf3d.zip
FreeBSD-src-a14af867093d4252dca678cc2623ff485f5fcf3d.tar.gz
Describe why pututxline() doesn't entirely conform to standards.
Diffstat (limited to 'lib/libc/gen/getutxent.3')
-rw-r--r--lib/libc/gen/getutxent.322
1 files changed, 20 insertions, 2 deletions
diff --git a/lib/libc/gen/getutxent.3 b/lib/libc/gen/getutxent.3
index 58b1280..5098afe 100644
--- a/lib/libc/gen/getutxent.3
+++ b/lib/libc/gen/getutxent.3
@@ -414,14 +414,32 @@ The
.Fn endutxent ,
.Fn getutxent ,
.Fn getutxid ,
-.Fn getutxline ,
-.Fn pututxline
+.Fn getutxline
and
.Fn setutxent
functions are expected to conform to
.St -p1003.1-2008 .
.Pp
The
+.Fn pututxline
+function deviates from the standard by writing its records to multiple
+database files, depending on its
+.Fa ut_type .
+This prevents the need for special utility functions to update the other
+databases, such as the
+.Fn updwtmpx
+function which is often available in other implementations.
+It also tries to replace
+.Dv DEAD_PROCESS
+entries in the active sessions database when storing
+.Dv USER_PROCESS
+entries and no entry with the same value for
+.Fa ut_id
+has been found.
+The standard always requires a new entry to be allocated, which could
+cause an unbounded growth to the database.
+.Pp
+The
.Fn getutxuser
and
.Fn setutxdb
OpenPOWER on IntegriCloud