Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.bugs.4bsd Subject: Re: rlogin drops output when stop/start characters change Message-ID: <2744@sun.uucp> Date: Mon, 2-Sep-85 03:50:40 EDT Article-I.D.: sun.2744 Posted: Mon Sep 2 03:50:40 1985 Date-Received: Wed, 4-Sep-85 04:49:20 EDT References: <3216@mordor.UUCP> <1452@umcp-cs.UUCP> Distribution: net Organization: Sun Microsystems, Inc. Lines: 21 > > "rlogind" also sends an out-of-band message if it receives a > > TIOCPKT_FLUSHWRITE packet from the master side of the pty. (I > > haven't look at the code myself, but I'm told that the kernel never > > produces this packet type.) > > Ah, but it does! Look at the code for ptsstop and note the comment; > and compare the values of TIOCPKT_FLUSHREAD and FREAD, and those of > TIOCPKT_FLUSHWRITE and FWRITE. Recall that a TTY stop routine is > called both for flow control (^S/^Q) and for I/O flushes (TIOCFLUSH > and signals). Interestingly (or grossly, take your pick) enough, when ttyflush is called with FREAD but not FWRITE, not TIOCPKT_FLUSHREAD will be generated. The d_stop routine is called only if output is being flushed. (The S5 generic tty driver/unit driver interface is much cleaner; there's a general "special function" call and it has separate commands for "block input", "unblock input", "restart output", "suspend output", "resume suspended output", "transmit break", "flush output", and "flush input". Overloading "freeze output" with "flush output and maybe input too" is asking for trouble.) Guy Harris