Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!elroy.jpl.nasa.gov!jarthur!uunet!mcsun!ukc!edcastle!aiai!richard From: richard@aiai.ed.ac.uk (Richard Tobin) Newsgroups: comp.os.minix Subject: Non-blocking tty input Message-ID: <4186@skye.ed.ac.uk> Date: 19 Feb 91 17:54:53 GMT Reply-To: richard@aiai.UUCP (Richard Tobin) Organization: AIAI, University of Edinburgh, Scotland Lines: 31 [Minix 1.5.10] 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. It seems that something like if((m_ptr->TTY_FLAGS & O_NONBLOCK) && (tp->tty_incount == 0 || !(tp->tty_mode & (RAW | CBREAK)) && tp->tty_lfct == 0)) { tty_reply(TASK_REPLY, m_ptr->m_source, m_ptr->PROC_NR, EAGAIN); return; } would make it work (or the non-blocking flag could be passed on to rd_chars()). Any comments? -- Richard PS I didn't receive any response to my message about the stack not being completely written out in core dumps if adjust() hasn't been called recently enough. Has this been fixed? -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nsfnet-relay.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin