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

[catnap] ambiguous use of Fail::errno for Windows #970

Open
kyleholohan opened this issue Oct 13, 2023 · 0 comments
Open

[catnap] ambiguous use of Fail::errno for Windows #970

kyleholohan opened this issue Oct 13, 2023 · 0 comments
Labels
bug Something Isn't Working

Comments

@kyleholohan
Copy link
Contributor

Description

The catnap runtime for Windows uses socket2 for underlying I/O. This crate indicates errors with the std::io::Error type, which relies upon the Rust-specific ErrorKind enum. Several sites in the code (such as catnap/socket.rs method try_pop) coerce the ErrorKind value into the error constructor. It seems the desired behavior is to use Fail's From<io::Error> trait.

How to Reproduce

Cause any failure condition on a Windows/catnap setup. The returned Err(e), e.errno will be an ErrorKind value.

Expected Behavior

Ideally we would translate the I/O error kind into a valid errno; however, even using the EIO code with the correct cause would improve correctness.

Related Issues

Possibly #344

@kyleholohan kyleholohan added the bug Something Isn't Working label Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something Isn't Working
Projects
None yet
Development

No branches or pull requests

1 participant