From 917390a696fb41df64df466fb5a4cf8ab00522da Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 22 Jun 2005 18:27:44 +0000 Subject: [PATCH] (desirable_utmp_entry): Fix bug where "who -b" and "who -r" failed to give output. --- lib/ChangeLog | 3 +++ lib/readutmp.c | 1 + 2 files changed, 4 insertions(+) diff --git a/lib/ChangeLog b/lib/ChangeLog index cffd88ee05..3dd4580aa2 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,5 +1,8 @@ 2005-06-22 Paul Eggert + * readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and + "who -r" failed to give output. Problem reported by Tim Waugh. + * xmalloc.c (HAVE_GNU_CALLOC): New constant. (xcalloc): Use it to avoid needless tests. Problem reported by Jim Meyering. diff --git a/lib/readutmp.c b/lib/readutmp.c index ca4472c650..846ab3c6a2 100644 --- a/lib/readutmp.c +++ b/lib/readutmp.c @@ -68,6 +68,7 @@ static inline bool desirable_utmp_entry (STRUCT_UTMP const *u, int options) { return ! (options & READ_UTMP_CHECK_PIDS + && IS_USER_PROCESS (u) && (UT_PID (u) <= 0 || (kill (UT_PID (u), 0) < 0 && errno == ESRCH))); } -- 2.30.2