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

Update *_badfd methods in the adapter to return an errno #7672

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

alexcrichton
Copy link
Member

Makes them a bit more consistent with the rest of the WASI functions as opposed to returning a boolean.

Makes them a bit more consistent with the rest of the WASI functions as
opposed to returning a boolean.
@alexcrichton alexcrichton requested a review from a team as a code owner December 11, 2023 15:21
@alexcrichton alexcrichton requested review from pchickey and removed request for a team December 11, 2023 15:21
@alexcrichton alexcrichton added this pull request to the merge queue Dec 11, 2023
Merged via the queue into bytecodealliance:main with commit 2acfb63 Dec 11, 2023
19 checks passed
@alexcrichton alexcrichton deleted the badfd-errno branch December 11, 2023 16:05
dicej pushed a commit to dicej/wasmtime that referenced this pull request Dec 12, 2023
…lliance#7672)

Makes them a bit more consistent with the rest of the WASI functions as
opposed to returning a boolean.
alexcrichton added a commit that referenced this pull request Dec 12, 2023
* add `adapter_{open|close}_badfd` exports to Preview 1 adapter (#7663)

* add `adapter_{open|close}_badfd` exports to Preview 1 adapter

This is to be used by `wasi-libc` to reserve file descriptors for its own use
(e.g. for sockets), ensuring that any attempt to pass them directly to Preview 1
functions will consistently return an error.

See WebAssembly/wasi-libc#447 for further details.

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

* add `preview2_adapter_badfd` test

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

---------

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

* Update `*_badfd` methods in the adapter to return an errno (#7672)

Makes them a bit more consistent with the rest of the WASI functions as
opposed to returning a boolean.

---------

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Co-authored-by: Alex Crichton <alex@alexcrichton.com>
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.

2 participants