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

wasi: improve stdin support for nonblocking, fix stdout #1542

Merged
merged 5 commits into from
Jun 28, 2023

Conversation

evacchi
Copy link
Contributor

@evacchi evacchi commented Jun 28, 2023

  • Allow nonblocking stdin to go through the "normal" file descriptor flow in poll_oneoff.
  • Ensure stdio FDs are not closed on SetAppend: the default behavior for SetAppend() is to reopen, that is close and then open again: this causes an error on std streams. Just ignore the call on them.

Fixes #1538.

Signed-off-by: Edoardo Vacchi evacchi@users.noreply.github.com

Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
evacchi added 3 commits June 28, 2023 20:30
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
@evacchi evacchi changed the title wasi: support nonblocking stdin in poll_oneoff wasi: improve stdin support for nonblocking, fix stdout Jun 28, 2023
@evacchi evacchi requested a review from achille-roussel June 28, 2023 18:49
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
@codefromthecrypt codefromthecrypt merged commit 39f2ff2 into tetratelabs:main Jun 28, 2023
@codefromthecrypt
Copy link
Contributor

nice work

This was referenced Jun 29, 2023
@evacchi evacchi deleted the nonblocking-stdin branch June 29, 2023 08:20
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

Successfully merging this pull request may close these issues.

Non-blocking stdio isn't working correctly
3 participants