Path: utzoo!attcan!uunet!lll-winken!csd4.milw.wisc.edu!bionet!apple!sun-barr!decwrl!ucbvax!APL.STANFORD.EDU!mis From: mis@APL.STANFORD.EDU (Misha Pavel) Newsgroups: comp.sys.sgi Subject: HELP: Low level terminal I/O Message-ID: <8907201857.aa12017@SMOKE.BRL.MIL> Date: 20 Jul 89 22:54:52 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 30 I have a problem that probably reflects more my understanding of the low-level I/O than its inherent difficulty, but I am not shure how to proceed. I need to read a tty line and return immediately even if there is nothing in the system buffer for that tty. To do that I set the terminal in raw mode with the folowing settings: term.c_iflag = IGNBRK; term.c_oflag = 0; term.c_lflag = 0; term.c_cflag = B9600 | CS8 | CREAD | PARENB | PARODD; term.c_cc[VMIN] = 1; term.c_cc[VTIME] = 0; I was hoping that the term.c_cc[VTIME] = 0 would do the job. But the system seems to be still waiting for at least one char. Is there any way to look at the system buffer and or return from read() when no input was generated? (Because of the real-time application I cannot afford to run a separate terminal process on my IRIS-2400). Any ideas? Thanks in advance Misha Pavel