Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1a 12/4/83; site rlgvax.UUCP Path: utzoo!watmath!clyde!floyd!vax135!cornell!uw-beaver!tektronix!zehntel!dual!onyx!amd70!fortune!hpda!hplabs!hao!seismo!rlgvax!guy From: guy@rlgvax.UUCP (Guy Harris) Newsgroups: net.unix,net.bugs.usg Subject: Re: Uniplus Unix 3 and O_NDELAY IO Message-ID: <1737@rlgvax.UUCP> Date: Sun, 19-Feb-84 14:30:57 EST Article-I.D.: rlgvax.1737 Posted: Sun Feb 19 14:30:57 1984 Date-Received: Tue, 28-Feb-84 22:31:06 EST References: <16797@sri-arpa.UUCP> Organization: CCI Office Systems Group, Reston, VA Lines: 24 The bug in System III no-delay reads from a terminal is that the system always claims that there are no characters available to read. The fix is to change the lines in "ttread" in "io/tty.c": if (tq->c_cc == 0) if (u.u_fmode&FNDELAY) return; else canon(tp); to: if (tq->c_cc == 0) if (u.u_fmode&FNDELAY && tp->t_rawq.c_cc == 0) return; else canon(tp); Thanks and a tip of the Hatlo to Warren Montgomery of BTL UNIX EMACS fame, who discovered this while trying to get EMACS' "look ahead and cancel redrawing" code to work on System III. Guy Harris {seismo,ihnp4,allegra}!rlgvax!guy