From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 05:09:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2945106566B; Fri, 22 Jan 2010 05:09:10 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B22A88FC0C; Fri, 22 Jan 2010 05:09:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M59APU054995; Fri, 22 Jan 2010 05:09:10 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M59ArC054993; Fri, 22 Jan 2010 05:09:10 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001220509.o0M59ArC054993@svn.freebsd.org> From: Ed Schouten Date: Fri, 22 Jan 2010 05:09:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202779 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 05:09:10 -0000 Author: ed Date: Fri Jan 22 05:09:10 2010 New Revision: 202779 URL: http://svn.freebsd.org/changeset/base/202779 Log: Describe why pututxline() doesn't entirely conform to standards. Modified: head/lib/libc/gen/getutxent.3 Modified: head/lib/libc/gen/getutxent.3 ============================================================================== --- head/lib/libc/gen/getutxent.3 Fri Jan 22 04:53:08 2010 (r202778) +++ head/lib/libc/gen/getutxent.3 Fri Jan 22 05:09:10 2010 (r202779) @@ -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