HELP: Low level terminal I/O
"Gary S. Moss", VLD/VMB
moss at BRL.MIL
Wed Aug 2 00:00:01 AEST 1989
[Jim Barton writes]
< Several others have posted valid solutions to this problem, but there is one
< valid one which is portable (although somewhat ugly) and used by many
< programs out there.
<
< You have the VMIN and VTIME settings backwards. The proper way to do
< this is to set:
<
< term.c_cc[VMIN] = 0;
< term.c_cc[VTIME] = 1;
I don't believe that this is portable, except on System V based machines.
It will work on some BSD-based systems, but not all, especially older
implementations. For example, here is an excerpt from the termio(4V) manual
page on my Sun (Release 3.2):
" 3. The MIN and TIME values supported by other implementations
can be set, but this has no effect on the terminal driver.
The driver behaves as if MIN were 1 and TIME were 0."
Basic BSD systems use the sgtty structures rather than termio; though later
versions have some compatibility with System V built in, you may not get
the behavior you want.
-moss
More information about the Comp.sys.sgi
mailing list