This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
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.
Perhaps we should make the default values for VMIN/VMAX configurable, possibly with settings that match other systems?
-- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |