"Sergey Poznyakoff" <[EMAIL PROTECTED]> wrote: > I have installed the following change to read_utmp: > > 2006-10-18 Sergey Poznyakoff <[EMAIL PROTECTED]> > > * lib/readutmp.c (desirable_utmp_entry): Implement new flag: > READ_UTMP_USER_PROCESS. > * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
Hi Sergey, That change looks fine. Next time I'll try to reply sooner. I've made this additional change: 2006-10-18 Jim Meyering <[EMAIL PROTECTED]> * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the type for a local, and rename it: s/up/user_proc/. Index: lib/readutmp.c =================================================================== RCS file: /sources/gnulib/gnulib/lib/readutmp.c,v retrieving revision 1.26 diff -u -r1.26 readutmp.c --- lib/readutmp.c 18 Oct 2006 13:24:19 -0000 1.26 +++ lib/readutmp.c 18 Oct 2006 17:49:14 -0000 @@ -69,11 +69,11 @@ static inline bool desirable_utmp_entry (STRUCT_UTMP const *u, int options) { - int up = IS_USER_PROCESS (u); - if ((options & READ_UTMP_USER_PROCESS) && !up) + bool user_proc = IS_USER_PROCESS (u); + if ((options & READ_UTMP_USER_PROCESS) && !user_proc) return false; if ((options & READ_UTMP_CHECK_PIDS) - && up + && user_proc && (UT_PID (u) <= 0 || (kill (UT_PID (u), 0) < 0 && errno == ESRCH))) return false;