Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!stl!daphne.stl.stc.co.uk!agm From: agm@daphne.stl.stc.co.uk (Andrew G. Minter) Newsgroups: comp.os.minix Subject: Re: Non-blocking tty input Message-ID: <4068@stl.stc.co.uk> Date: 20 Feb 91 09:40:04 GMT References: <4186@skye.ed.ac.uk> Sender: news@stl.stc.co.uk Reply-To: agm@daphne.stl.stc.co.uk (Andrew G. Minter) Organization: STC Technology Ltd Lines: 25 In article <4186@skye.ed.ac.uk>, richard@aiai.ed.ac.uk (Richard Tobin) writes: |> I see that read_write() in fs/read.c and dev_io() in fs/device.c take |> account of the O_NONBLOCK flag, the latter setting TTY_FLAGS (with a |> "temporary kludge" comment) in the message it passes to the tty task. |> However do_read() in kernel/tty.c ignores this flag. My Minix has had this patch for some time. I think this is the way you're supposed to do it under POSIX and it doesn't break anything as far as I can tell. It is a big win for programs like kermit which can't do all it's tricks unless it can find out whether there is keyboard input waiting. It would also be useful for emacs! I'd very much like to see this patch as standard. Andrew -- ################################################################ # Andrew G. Minter # Email: agm@stl.stc.co.uk # # Principal Research Engineer # Phone: +44 279 429531 ext 3165 # # STC Technology Ltd # Fax: +44 279 441551 # # London Road # ITN: 982-3165 # # Harlow Essex CM17 9NA # Telex: 81151 STL HW G # ################################################################