From owner-freebsd-hackers Mon Dec 9 02:03:50 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id CAA25609 for hackers-outgoing; Mon, 9 Dec 1996 02:03:50 -0800 (PST) Received: from hemi.com (hemi.com [204.132.158.10]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id CAA25604 for ; Mon, 9 Dec 1996 02:03:47 -0800 (PST) Received: (from mbarkah@localhost) by hemi.com (8.8.3/8.7.3) id CAA15644; Mon, 9 Dec 1996 02:51:24 -0700 (MST) From: Ade Barkah Message-Id: <199612090951.CAA15644@hemi.com> Subject: Re: bug in 2.2-alpha loopback (?) To: bde@zeta.org.au (Bruce Evans) Date: Mon, 9 Dec 1996 02:51:24 -0700 (MST) Cc: joerg_wunsch@uriah.heep.sax.de, freebsd-hackers@freebsd.org In-Reply-To: <199612080824.TAA19537@godzilla.zeta.org.au> from "Bruce Evans" at Dec 8, 96 07:24:22 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Bruce Evans wrote: > >Sorry, I wasn't very careful considering all the variables. This > >might be a "telnet" problem instead of a loop interface problem > > See another thread in freebsd-bugs about bugs in telnet LINEMODE. [...program deleted...] > Run this and type `1^D' where ^D is the eof character for the tty. The > read should return 1, but in telnet LINEMODE it doesn't return. The > eol character is similarly broken (when set). The eol2 character works. Yeah... it fails to process the EOF unless it's the first character of the line. =-( J Wunsch wrote: > Since the network server on Machine C is not a telnet server, linemode > negotiation should IMHO not occur, and the connection should rather > remain in character-at-a-time mode anyway, but i better leave the > actual interpretation to the telnet gurus. :) I think it is fine for the telnet client to default in LINEMODE. In fact, I think Unix telnet has always defaulted to linemode since "way back when" (VMS ones stay in character mode.) I've seen many naive servers on the net (muds, chatlines, etc.) depend on the client starting in LINEMODE. The question is then, when the input tty is closed, should the client send an actual EOF character to the server or simply close the output connection ? Currently telnet forces out an EOF character by doing: (from sys_bsd.c:) [...up here somewhere basically (c = read (tin... ))...] | /* EOF detection for line mode!!!! */ | if ((c == 0) && MODE_LOCAL_CHARS(globalmode) && isatty(tin)) { | /* must be an EOF... */ | *ttyiring.supply = termEofChar; | c = 1; | } If I #ifdef out the above lines, things then work as I expect (erm, as I want, I mean.) In the mean time I'll check for an explicit EOF character in my programs. Thanks for all the replies, -Ade ps. Is David Borman the correct person to bug ? ------------------------------------------------------------------- Inet: mbarkah@hemi.com - HEMISPHERE ONLINE - -------------------------------------------------------------------