session start time. This is useful when looking at old or long-running
wtmp files.
PR: bin/12982
Obtained from: KOJIMA Hajime <kjm@rins.ryukoku.ac.jp>, keramida
Reviewed by: keramida
MFC after: 1 week
needs to be retained across entries, and we need to exit(), not
return from doentry() when `maxrec' reaches 0. Move the code for
processing `maxrec' into printentry() for simplicity.
time_to_xxx() and xxx_to_time() functions. e.g. _time_to_xxx()
instead of time_to_xxx(), to make it more obvious that these are
stopgap functions & placemarkers and not meant to create a defacto
standard. They will eventually be replaced when a real standard
comes out of committee.
found in wtmp(5) for the same TTY without in-between "logout"
mark.
This may be demonstrated by executing login(1), logging in and
out, and watching the last(1) output on this TTY:
: # last -tv7 -w
: ru ttyv7 Mon May 28 12:46 - 12:46 (00:00:01)
: ru ttyv7 Mon May 28 12:45 still logged in
The fix merely takes the second "login" mark as the "logout" for
the first "login" mark, if there were no "logout" mark in-between.
This restores the behavior of last.c,v 1.2:
: # last -tv7 -w
: ru ttyv7 Mon May 28 12:46 - 12:46 (00:00:01)
: ru ttyv7 Mon May 28 12:45 - 12:46 (00:00:25)
Silence from: -arch, dg
track.
The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;
.\" $Id$
.\"
If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.
Approved by: bde
made other performance improving changes. This improves the performance
of last(1) by as much as 32 times in some cases, and in more typical cases
is about twice as fast.
Added a BUGS section to the manual page to describe the behavior of last(1)
when a login shell terminates abnormally (and thus doesn't write a logout
record to the wtmp file).