(desirable_utmp_entry): Fix bug where "who -b" and "who -r"
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 22 Jun 2005 18:26:22 +0000 (18:26 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 22 Jun 2005 18:26:22 +0000 (18:26 +0000)
failed to give output.

lib/ChangeLog
lib/readutmp.c

index d81d87552de4822681b0fc344730cab38907db49..a5a50436fe5dddb1ec6c9d43f85e0736c339c759 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
+       "who -r" failed to give output.  Problem reported by Tim Waugh.
+
 2005-06-22  Jim Meyering  <jim@meyering.net>
 
        * xmalloc.c: Update from gnulib.
index ca4472c650a2994c06693678e3b1c39d608bf59c..846ab3c6a2da7103752ec757a18172697f880384 100644 (file)
@@ -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)));
 }