Project

General

Profile

Submit #3260 ยป 0001-w-Take-into-account-terminal-session-ID.patch

dancrossnyc, 01/11/2021 06:54 AM

View differences:

usr.bin/w/w.c
269 269
	if ((kp = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nentries)) == NULL)
270 270
		err(1, "%s", kvm_geterr(kd));
271 271
	for (i = 0; i < nentries; i++, kp++) {
272
		/*
273
		 * login(1) is a special case.
274
		 */
275
		if (strcmp(kp->kp_comm, "login") == 0)
276
			continue;
272 277
		if (kp->kp_stat == SIDL || kp->kp_stat == SZOMB)
273 278
			continue;
279
		if (kp->kp_sid != kp->kp_tsid)
280
			continue;
274 281
		for (ep = ehead; ep != NULL; ep = ep->next) {
275 282
			if (ep->tdev == kp->kp_tdev) {
276 283
				/*
    (1-1/1)