This is the mail archive of the
ecos-bugs@sources.redhat.com
mailing list for the eCos project.
[Bug 21968] New: select does not work on stdin
- From: bugzilla-daemon at ecoscentric dot com
- To: ecos-bugs at sources dot redhat dot com
- Date: Fri, 25 Apr 2003 01:48:23 +0100 (BST)
- Subject: [Bug 21968] New: select does not work on stdin
http://bugs.ecos.sourceware.org/show_bug.cgi?id=21968
Summary: select does not work on stdin
Product: eCos
Version: 1.3.1
Platform: assabet (Intel StrongARM SA1110 board)
OS/Version: ARM
Status: UNCONFIRMED
Severity: normal
Priority: low
Component: Other
AssignedTo: jifl at ecoscentric dot com
ReportedBy: support at ecoscentric dot com
When using the select function defined as:
__externC
int
select (
int nfd,
fd_set *in,
fd_set *out,
fd_set *ex,
struct timeval *tv);
the target does not respond to the following source:
int main (void)
{
fd_set rfds;
struct timeval tv;
int retval;
FD_ZERO(&rfds);
FD_SET(0, &rfds);
tv.tv_sec = 5;
tv.tv_usec = 0;
retval = select(1, &rfds, NULL, NULL, &tv);
if (retval)
{
printf("\nData is available now.\n");
}
else
{
printf("\nNo data within five seconds.\n");
}
return 0;
}
The select function should be answering when something is
entered on stdin (fd 0). But I can type as much as I want on
my keyboard and press Enter as much as I can, but it keeps on
responding that no data is present on stdin.
How-To-Repeat:
Just copy the code above, and run it on the Intel Assabet board.
---------------------------------------------------------------------------
Originator:
Nick van den Bosch
Organization:
Philips
Unformatted:
Originator:
page: sourceware.cygnus.com/ecos/problemreport.html
Send_PR_form: Sent_from_sourceware.cygnus.com
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.