Project

General

Profile

Submit #3260 ยป 0001-w-Take-into-account-terminal-session-ID.patch

dancrossnyc, 01/11/2021 06:54 AM

View differences:

usr.bin/w/w.c
if ((kp = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nentries)) == NULL)
err(1, "%s", kvm_geterr(kd));
for (i = 0; i < nentries; i++, kp++) {
/*
* login(1) is a special case.
*/
if (strcmp(kp->kp_comm, "login") == 0)
continue;
if (kp->kp_stat == SIDL || kp->kp_stat == SZOMB)
continue;
if (kp->kp_sid != kp->kp_tsid)
continue;
for (ep = ehead; ep != NULL; ep = ep->next) {
if (ep->tdev == kp->kp_tdev) {
/*
    (1-1/1)