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

Fix SocketFlags usage on AIX #187

Merged
merged 2 commits into from
Mar 6, 2024
Merged

Fix SocketFlags usage on AIX #187

merged 2 commits into from
Mar 6, 2024

Conversation

ecnelises
Copy link
Contributor

AIX has neither SOCK_NONBLOCK nor SOCK_CLOEXEC flags.

AIX has neither SOCK_NONBLOCK nor SOCK_CLOEXEC flags.
@taiki-e
Copy link
Collaborator

taiki-e commented Mar 5, 2024

Is FD_CLOEXEC supported? If so, could you add AIX to the following cfgs?

async-io/src/lib.rs

Lines 2126 to 2133 in 6866c01

// Set cloexec if necessary.
#[cfg(any(
target_os = "macos",
target_os = "ios",
target_os = "tvos",
target_os = "watchos",
))]
rio::fcntl_setfd(&socket, rio::fcntl_getfd(&socket)? | rio::FdFlags::CLOEXEC)?;

Copy link
Collaborator

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@taiki-e taiki-e merged commit 316256a into smol-rs:master Mar 6, 2024
21 checks passed
@notgull
Copy link
Member

notgull commented Mar 6, 2024

@ecnelises Do you know of a way to test AIX locally? I don't have AIX so I can't run it in a VM to verify this.

@ecnelises
Copy link
Contributor Author

Sorry, I don't know a easy way to do test in AIX environment locally. (Maybe inside QEMU container?) Anyway if you have some smaller case, I can help to test it. And after AIX target gains cross compilation ability, we will be able to do some sanity checks at least..

@notgull notgull mentioned this pull request Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants