From owner-freebsd-hackers Sat Aug 12 10:43:29 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id KAA06543 for hackers-outgoing; Sat, 12 Aug 1995 10:43:29 -0700 Received: from mr-p.protocorp.com (d22.leonardo.net [198.147.97.86]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id KAA06534 for ; Sat, 12 Aug 1995 10:43:25 -0700 Received: from caern.leonardo.net (localhost [127.0.0.1]) by mr-p.protocorp.com (8.6.11/8.6.9) with ESMTP id KAA00405 for ; Sat, 12 Aug 1995 10:42:34 GMT Message-Id: <199508121042.KAA00405@mr-p.protocorp.com> To: hackers@freebsd.org Subject: minor frob for 'finger' Date: Sat, 12 Aug 1995 10:42:33 +0000 From: "Mike O'Brien" Sender: hackers-owner@freebsd.org Precedence: bulk Longtime ARPAnauts will remember that 'finger' used to work a little differently over the net - the closing brace around the host name was not printed until a net connection had been successfully established. That code broke in the UNIX version when stdout to a terminal was made line-buffered by default...and now I see the original code (which must have looked very mysterious) has disappeared entirely, in favor of having the host name printed before the connection rather than after, which was the effect of the breakage. I'm sorry, but I'm an old fart. I prefer finger's original behavior. Hence, this patch, humbly proffered: *** net.c.dist Tue May 30 06:30:16 1995 --- net.c Sat Aug 12 10:32:20 1995 *************** *** 95,106 **** } /* have network connection; identify the host connected with */ ! (void)printf("[%s]\n", hp->h_name); if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) { perror("finger: connect"); (void)close(s); return; } /* -l flag for remote fingerd */ if (lflag) --- 95,108 ---- } /* have network connection; identify the host connected with */ ! (void)printf("[%s", hp->h_name); ! (void)fflush(stdout); if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) { perror("finger: connect"); (void)close(s); return; } + (void)printf("]\n"); /* -l flag for remote fingerd */ if (lflag)