diff --git a/timeoutd.c b/timeoutd.c index 2af48f7..6ec4218 100644 --- a/timeoutd.c +++ b/timeoutd.c @@ -823,7 +823,7 @@ void check_idle() struct stat status; time_t idle, sesstime; - if (utmpp->ut_type != USER_PROCESS || kill(utmpp->ut_pid, 0)) /* if not user process, or if proc doesn't exist */ + if (utmpp->ut_type != USER_PROCESS || kill(utmpp->ut_pid, 0) == -1) /* if not user process, or if proc doesn't exist */ return; /* skip the utmp entry */ strncpy(user, utmpp->ut_user, sizeof(user) - 1); /* get user name */ user[sizeof(user) - 1] = '\0'; /* null terminate user name string */