summaryrefslogtreecommitdiff
path: root/lib/readutmp.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-06-22 18:26:22 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-06-22 18:26:22 +0000
commit956daabfc622916858b9e11e6b724c5fc5c07d62 (patch)
treea3c71b89c9557c0a7b7e32efdaaf75d5b956705e /lib/readutmp.c
parent070e3b128034dd042ab8c5e8c2a2caa791db1f02 (diff)
downloadcoreutils-956daabfc622916858b9e11e6b724c5fc5c07d62.tar.xz
(desirable_utmp_entry): Fix bug where "who -b" and "who -r"
failed to give output.
Diffstat (limited to 'lib/readutmp.c')
-rw-r--r--lib/readutmp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/readutmp.c b/lib/readutmp.c
index ca4472c65..846ab3c6a 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)));
}