Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!think!husc6!bu-cs!bzs From: bzs@bu-cs.BU.EDU (Barry Shein) Newsgroups: net.lang.c,net.unix Subject: Re: C I/O Question Message-ID: <1027@bu-cs.bu-cs.BU.EDU> Date: Sat, 9-Aug-86 13:58:31 EDT Article-I.D.: bu-cs.1027 Posted: Sat Aug 9 13:58:31 1986 Date-Received: Wed, 13-Aug-86 01:27:18 EDT Organization: Boston U. Comp. Sci. Lines: 24 Xref: mnetor net.lang.c:5622 net.unix:5183 Re: termio From dan@rose3 >If you want to check to see if there is any input pending WITHOUT >waiting at all, then you should set min to 0. If you are setting >min to zero, then your system is busted. > >Also, something not mentioned in all manuals is that the timeout >should not be set to 1. Use 0 for no timeout, or a value of 2 >or greater. Setting a timeout of 1 is similiar to doing a sleep(1). And setting to 0xff means wait forever. And remember to set it all back carefully as VTIME and VMIN are also your VEOF and VEOL chars so you can't use both at once, not that you would want to but a microbyte saved is a microbuck earned...And all this is void in months with an 'r' in them except when time(0) returns a prime or the characters in the buffer sum to a perfect square... Hey, it's useable, but I doubt more and more as time goes on that this re-write was any improvement over the V7 stuff. Who *did* design this "improvement"? -Barry Shein, Boston University