]> git.ipfire.org Git - thirdparty/util-linux.git/commit
last: make session gone determination more robust
authorSami Kerola <kerolasa@iki.fi>
Tue, 21 Jan 2014 22:05:05 +0000 (22:05 +0000)
committerKarel Zak <kzak@redhat.com>
Mon, 10 Feb 2014 17:25:31 +0000 (18:25 +0100)
commit404fa3f93c00c7e130f5a0ec963b2dc6a3743986
tree35d64216dd7d675e5260454b93147afa4eb7e84f
parent098ab0778f5a46ab4519c8404fd4ba8ec137368b
last: make session gone determination more robust

Earlier determination that used kill with signal zero to pid was prone to
false positive reports, due reuse of pid space and unrelated processes.
New function is_phantom() tries do a little bit better job, but fails to
be perfect.  It seems linking to gether utmp session start time or
terminal id with /proc/<pid>/ information is not as simple as one might
hope.

Reported-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
login-utils/last.c