From owner-freebsd-current Sun Mar 24 10:56:29 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA17747 for current-outgoing; Sun, 24 Mar 1996 10:56:29 -0800 (PST) Received: from time.cdrom.com (time.cdrom.com [204.216.27.226]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id KAA17741 for ; Sun, 24 Mar 1996 10:56:28 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by time.cdrom.com (8.7.5/8.6.9) with SMTP id KAA23490; Sun, 24 Mar 1996 10:51:57 -0800 (PST) To: "Rodney W. Grimes" cc: paul@netcraft.co.uk, joerg_wunsch@uriah.heep.sax.de, freebsd-current@FreeBSD.ORG, loodvrij@gridpoint.com Subject: Re: Patch to talkd In-reply-to: Your message of "Sun, 24 Mar 1996 10:49:20 PST." <199603241849.KAA27707@GndRsh.aac.dev.com> Date: Sun, 24 Mar 1996 10:51:57 -0800 Message-ID: <23488.827693517@time.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > As a side effect of this patch what happens to a talk request if your > least idle xterm has mesg n turned on? Does the talk fall back to > another xterm, or do you get an error now? Geeze, UTSL folks! :-) if (*tty == '\0' || best != 0) { if (best == 0) status = PERMISSION_DENIED; /* no particular tty was requested */ (void) strcpy(ftty + sizeof(_PATH_DEV) - 1, line); if (stat(ftty, &statb) == 0) { if (!(statb.st_mode & 020)) continue; if (statb.st_atime > best) { best = statb.st_atime; (void) strcpy(tty, line); status = SUCCESS; continue; } } } Looking at the loop in question, you can see that it tries to pick a "best" tty now rather than simply settling for the first one that's applicable. The checks for applicability, e.g. whether or not the modes are correct and the tty is openable, remain unchanged. Jordan