Gary Thomas wrote:
Andre-John Mas wrote:
Hi,
I have the code below. I want to be able to block until something
is inputted and then continue. The only problem is am finding that
it continues even without anything being inputed. What should I be
doing differently:
It looks like a bug :-( It seems when ICANON is turned off, the
channel becomes non-blocking and will return EOF (or the equivalent)
when read. I tried the attached program - on Linux it works as
expected, but on eCos, it gets EOF.
Jonathan - you worked the termios code originally - any ideas?
Non-canonical mode processing was only implemented to support
VMIN=0,TIME=0. Support for VMIN>0 is rudimentary and I wouldn't trust it.
But VMIN defaults to 0, and that sample code posted doesn't attempt to set
it to anything else.
I imagine it defaults to something else on Linux, hence the difference in
behaviour. <fx: goes and checks> Aha, in fact it defaults to 6. The POSIX
standard does not set any requirements for the default value, so eCos is
fine on this count.
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
------["The best things in life aren't things."]------ Opinions==mine
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss