From 63b6a8fcbfb3115db0827b8402aef641e05e2ab9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20G=C3=B6rig?= Date: Thu, 16 Dec 2010 10:15:35 +0100 Subject: [PATCH] Make w make better guesses for user process Based on suggestion by Herbert Xu Bug-Debian: http://bugs.debian.org/187808 Author: Craig Small --- w.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/w.c b/w.c index 1b2a0fc0..c2e996a8 100644 --- a/w.c +++ b/w.c @@ -159,7 +159,7 @@ static const proc_t *getproc(const utmp_t *restrict const u, const char *restric secondbest = tmp; } if(!ignoreuser && uid != tmp->euid && uid != tmp->ruid) continue; - if(tmp->tgid != tmp->tpgid) continue; + if(tmp->pgrp != tmp->tpgid) continue; if(best && tmp->start_time <= best->start_time) continue; best = tmp; } -- 2.40.0