C I/O Question

Barry Shein bzs at bu-cs.BU.EDU
Sun Aug 10 03:58:31 AEST 1986


Re: termio

>From dan at 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



More information about the Comp.unix mailing list