Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] stdin poll always return readable #139

Open
qzheng527 opened this issue Dec 10, 2021 · 0 comments
Open

[BUG] stdin poll always return readable #139

qzheng527 opened this issue Dec 10, 2021 · 0 comments
Assignees

Comments

@qzheng527
Copy link
Contributor

Describe the bug

Poll stdin (FD 0) always return readable (Events::IN) even if no input at all.

To reproduce

Steps to reproduce the behavior:

`
/* Watch stdin (fd 0) to see when it has input. */
FD_ZERO(&rfds);
FD_SET(0, &rfds);

/* Wait up to five seconds. */
tv.tv_sec = 5;
tv.tv_usec = 0;

retval = select(1, &rfds, NULL, NULL, &tv);
`
Above code always return immediately.

Expected behavior

No IN event if there is no input.

Environment

  • HW: [e.g. SGX1, SGX2]
  • OS: [e.g. Ubuntu18.04, CentOS8.1]
  • Occlum version: [e.g. 0.17.0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants