Blame SOURCES/bsd-finger-0.17-utmp.patch
|
|
c7b137 |
--- bsd-finger-0.17/finger/finger.c.utmp 2004-06-15 11:38:24.000000000 -0400
|
|
|
c7b137 |
+++ bsd-finger-0.17/finger/finger.c 2004-06-15 12:22:15.000000000 -0400
|
|
|
c7b137 |
@@ -75,6 +75,8 @@
|
|
|
c7b137 |
#include <limits.h>
|
|
|
c7b137 |
#include <time.h>
|
|
|
c7b137 |
#include <getopt.h>
|
|
|
c7b137 |
+#include <signal.h>
|
|
|
c7b137 |
+#include <errno.h>
|
|
|
c7b137 |
#include "finger.h"
|
|
|
c7b137 |
#ifdef _USAGI
|
|
|
c7b137 |
#include "version.h"
|
|
|
c7b137 |
@@ -224,6 +226,8 @@
|
|
|
c7b137 |
#ifdef USER_PROCESS
|
|
|
c7b137 |
if (uptr->ut_type != USER_PROCESS) continue;
|
|
|
c7b137 |
#endif
|
|
|
c7b137 |
+ if (kill(uptr->ut_pid, 0) < 0 && errno == ESRCH)
|
|
|
c7b137 |
+ continue;
|
|
|
c7b137 |
if ((pn = find_person(uptr->ut_name)) == NULL) {
|
|
|
c7b137 |
memcpy(name, uptr->ut_name, UT_NAMESIZE);
|
|
|
c7b137 |
if ((pw = getpwnam(name)) == NULL)
|
|
|
c7b137 |
@@ -331,6 +335,8 @@
|
|
|
c7b137 |
#ifdef USER_PROCESS
|
|
|
c7b137 |
if (uptr->ut_type != USER_PROCESS) continue;
|
|
|
c7b137 |
#endif
|
|
|
c7b137 |
+ if (kill(uptr->ut_pid, 0) < 0 && errno == ESRCH)
|
|
|
c7b137 |
+ continue;
|
|
|
c7b137 |
if ((pn = find_person(uptr->ut_name)) == NULL) {
|
|
|
c7b137 |
continue;
|
|
|
c7b137 |
}
|
|
|
c7b137 |
--- bsd-finger-0.17/finger/util.c.utmp 2004-06-15 11:38:24.000000000 -0400
|
|
|
c7b137 |
+++ bsd-finger-0.17/finger/util.c 2004-06-15 11:38:24.000000000 -0400
|
|
|
c7b137 |
@@ -71,6 +71,8 @@
|
|
|
c7b137 |
}
|
|
|
c7b137 |
snprintf(tbuf, TBUFLEN, "%s/%s", _PATH_DEV, w->tty);
|
|
|
c7b137 |
if (stat(tbuf, &sb) < 0) {
|
|
|
c7b137 |
+ w->idletime = 0; /* No tty no write, no idle data */
|
|
|
c7b137 |
+ w->writable = 0;
|
|
|
c7b137 |
switch (errno) {
|
|
|
c7b137 |
case ENOENT:
|
|
|
c7b137 |
break;
|