Uniplus Unix 3 and O_NDELAY IO
Guy Harris
guy at rlgvax.UUCP
Mon Feb 20 05:30:57 AEST 1984
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
More information about the Comp.unix
mailing list