bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] who and stale utmp entries


From: Paul Eggert
Subject: Re: [patch] who and stale utmp entries
Date: Wed, 22 Jun 2005 11:29:38 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Tim Waugh <address@hidden> writes:

> I had a bug report that 'who -b' and 'who -r' fail to give output with
> this patch.  This fixes it:

Thanks for reporting that.  IS_USER_PROCESS is already defined in
readutmp.h, so I installed this simpler patch in both coreutils
and gnulib.

2005-06-22  Paul Eggert  <address@hidden>

        * readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
        "who -r" failed to give output.  Problem reported by Tim Waugh.

--- readutmp.c.~1.27.~  2005-06-01 16:46:04 -0700
+++ readutmp.c  2005-06-22 11:23:45 -0700
@@ -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)));
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]