Add support for setting socket's blocking mode through ioctl with FIO… #24641
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…NBIO
Today I was recompiling quakejs (12 years later, better late than never :)) against the latest emscripten. Everything was smooth sailing, but I hit one issue because ioctl() used to be under-implemented, and now it's more fleshed out but missing support for FIONBIO (https://github.com/torvalds/linux/blob/66701750d5565c574af42bef0b789ce0203e3071/fs/ioctl.c#L341).
I don't have the tests working locally right now, so I'm crossing my fingers that some CI job kicks in here to help verify. I modified
test_sockets_echo_serverwhich had support for both Winsock / POSIX sockets, and shimmed it to use ioctl() on POSIX to help test this.Edit: Of course, this doesn't actually change or implement any support for O_NONBLOCK inside of libsockfs, it's just enabling the flag to be set just as it would be through fcntl.