On Sun, May 10, 2009, Loïc Minier wrote:
>  Running ./test_utmp in the situation of the bug gives:
> ut_type: 7
> ut_user: foobar
> ut_id: 2
> ut_type: 6
> ut_user: LOGIN
> ut_id: 2
> userdel check
> user foobar is currently logged in

 "w foobar" checks whether the PID still corresponds to an existing
 process.

 I've rebuilt procps' w and confirmed that I'm hitting the PID test.

    best = getproc(u, tty + 5, &jcpu, &ut_pid_found);

    /* just skip if stale utmp entry (i.e. login proc doesn't exist).  If there
     * is a desire a cmdline flag could be added to optionally show it with a
     * prefix of (stale) in front of cmd or something like that.
     */
    if (!ut_pid_found) {
        return;
    }

 (getproc() is a bit long to copy here and I didn't read it fully)

-- 
Loïc Minier



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to