[procps] [PATCH 1/7] Make w make better guesses for user process

  • From: Jan Görig <jgorig@xxxxxxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Thu, 16 Dec 2010 11:15:56 +0100

Based on suggestion by Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Bug-Debian: http://bugs.debian.org/187808
Author: Craig Small <csmall@xxxxxxxxxx>
---
 w.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/w.c b/w.c
index 1b2a0fc..c2e996a 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;
     }
-- 
1.7.3.3


Other related posts:

  • » [procps] [PATCH 1/7] Make w make better guesses for user process - Jan Görig