Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/w/w.c
Show First 20 Lines • Show All 356 Lines • ▼ Show 20 Lines | for (i = 0; i < nentries; i++, kp++) { | ||||
if (kp->ki_stat == SIDL || kp->ki_stat == SZOMB || | if (kp->ki_stat == SIDL || kp->ki_stat == SZOMB || | ||||
kp->ki_tdev == NODEV) | kp->ki_tdev == NODEV) | ||||
continue; | continue; | ||||
for (ep = ehead; ep != NULL; ep = ep->next) { | for (ep = ehead; ep != NULL; ep = ep->next) { | ||||
if (ep->tdev == kp->ki_tdev) { | if (ep->tdev == kp->ki_tdev) { | ||||
/* | /* | ||||
* proc is associated with this terminal | * proc is associated with this terminal | ||||
*/ | */ | ||||
if (ep->kp == NULL && kp->ki_pgid == kp->ki_tpgid) { | if (ep->kp == NULL && | ||||
kp->ki_pgid == kp->ki_tpgid) { | |||||
/* | /* | ||||
* Proc is 'most interesting' | * Proc is 'most interesting' | ||||
*/ | */ | ||||
if (proc_compare(ep->kp, kp)) | |||||
ep->kp = kp; | ep->kp = kp; | ||||
} | } | ||||
/* | /* | ||||
* Proc debug option info; add to debug | * Proc debug option info; add to debug | ||||
* list using kinfo_proc ki_spare[0] | * list using kinfo_proc ki_spare[0] | ||||
* as next pointer; ptr to ptr avoids the | * as next pointer; ptr to ptr avoids the | ||||
* ptr = long assumption. | * ptr = long assumption. | ||||
*/ | */ | ||||
dkp = ep->dkp; | dkp = ep->dkp; | ||||
▲ Show 20 Lines • Show All 201 Lines • Show Last 20 Lines |