Ed Schouten c5cf53fc3e Make our utmpx more like System V.
When booting the system, truncate the utx.active file, but do write the
BOOT_TIME record into it afterwards. This allows one to obtain the boot
time of the system as follows:

	struct utmpx u1 = { .ut_type = BOOT_TIME }, *u2;

	setutxent();
	u2 = getutxid(&u1);

Now, the boot time is stored in u2->ut_tv, just like on Linux and other
systems.

We don't open the utx.active file with O_EXLOCK. It's rather unlikely
that other applications use this database at the same time and I want to
prevent the possibility of deadlocks in init(8).

Discussed with:	pluknet
2011-10-27 17:05:18 +00:00
..
2011-10-27 17:05:18 +00:00
2011-04-14 15:42:15 +00:00
2010-08-03 17:40:09 +00:00
2011-10-19 11:43:51 +00:00
2010-12-04 08:44:56 +00:00
2010-06-13 01:27:29 +00:00
2011-09-28 14:52:25 +00:00