From e8e06e59ac3275d5040d9b64b28f9050b9fd2128 Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Wed, 6 May 2020 19:05:56 +0200 Subject: [PATCH] debug --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 040dc54..40705fc 100644 --- a/main.c +++ b/main.c @@ -136,7 +136,7 @@ int getprocinfo( int ppid, char cmdline[], char cmd[], char user[] ) null2space( str ); if ( (pos = strstr( str, "USER=")) != NULL) { - sscanf( pos, "%s", user); + sscanf( pos+5, "%s", user); } return retval; } @@ -209,7 +209,7 @@ int main() //get the list of children if ( (n=getpids( pid, pids )) != -1) { - for ( y=0; y<=n; y++) + for ( y=0; y