This is the mail archive of the ecos-discuss@sources.redhat.com 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] |
Satoshi Sasaki wrote:
read() failed if the following programs are executed. test_prog() is executed as a thread. int test_prog() { char tmpbuf[5]; write(1,"XXXX",4); read(0,&tmpbuf,4);
[snip]
Yes. The issue is that in the default configuration, stdio uses /dev/ttydiag, which is a TTY device over a "pretend" serial device that actually uses the HAL diagnostic I/O routines. These routines may or may not support input, and more importantly won't work if you're communicating via GDB.Can I use standard input(fd number 0)?
You can do that, or you can change CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE to select the TTY device you really want.Or is it necessary to call open() again from a user program?
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |