Re: utmpx implementation
On Fri, Feb 15, 2002 at 12:55:37PM -0500, Jimmy Kaplowitz wrote:
> On Thu, Feb 14, 2002 at 11:23:20PM -0500, firstname.lastname@example.org wrote:
> > I've implemented utmpx for FreeBSD, and placed it under BSD license. This
> > should be a standards-compliant (SUSv2) implementation, that is approximately
> > equivilent to the utmp in glibc or Solaris. The major difference from Linux
> > is that it uses /var/run/utmpx, and getutent becomes getutxent.
> Why these different names, then? I would think that it would help
> compatibility with Linux programs to use the non-"x" names. Or is there
> another standard that specifies the "x"?
SUSv2 specifies this, so portable code should work with it, because Solaris
and quite a few other systems use it. I think it may have been in SysV, but
I'm not sure.
Glibc implements this by defining these functions to be the same as the utmp
ones. That satisfies the standard, but other systems don't all do it that way,
and code that assumes utmp has everything isn't portable.
By implementing it this way, I get standards compliance, and I also get the
ability to offer this source to the BSD's for inclusion. Just because it
supports runlevels doesn't mean you have to use them...