Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!tymix!cirrusl!sunstorm!dhesi From: dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) Newsgroups: comp.unix.questions Subject: Re: BSD vs. SVR4 typehead flush after tty mode change Message-ID: <2566@cirrusl.UUCP> Date: 16 Oct 90 22:55:30 GMT References: <15042@cbmvax.commodore.com> <4187@auspex.auspex.com> <14148@smoke.BRL.MIL> <4191@auspex.auspex.com> <15175@cbmvax.commodore.com> Sender: news@cirrusl.UUCP Organization: Cirrus Logic Inc. Lines: 18 UNIX assumes a per-tty state rather than a per-process state, i.e., it's the tty driver that's in a certain mode of operation rather than the process. This leads to all sorts of problems. (Though it no doubt greatly simplifies the system call interface and avoids the QIO fiasco in VMS.) I think the tty stream ("stream", not necessarily "STREAM") should associate each data byte with a control byte. The control byte could tell you when EOF was seen, and also what state the tty was in when the character was read. My gut feeling is that this would make all sorts of tty interfaces (including what BSD does and what SVR4 does) more powerful. You could even go so far as putting a "delete previous character" control byte in the stream, so the next module in the STREAM ("STREAM", not necessarily "stream") could edit the incoming stream of characters. -- Rahul Dhesi UUCP: oliveb!cirrusl!dhesi