Explicitly set listener FD to non-blocking mode#9
Explicitly set listener FD to non-blocking mode#9rvolosatovs wants to merge 1 commit intodotnet:mainfrom
Conversation
Implementation assumes the listener to be in non-blocking mode (see `errno != __WASI_ERRNO_AGAIN` check on L64), but it never actually ensures it is. This commit changes that and ensures that the listener is non-blocking. Signed-off-by: Roman Volosatovs <roman@profian.com>
|
For the record, I have not actually tested this, but looks like |
|
You could perhaps use https://man7.org/linux/man-pages/man3/strerror.3.html. |
True, but I decided not to for consistency with existing error handing approach in this function https://github.com/rvolosatovs/dotnet-wasi-sdk/blob/644e1d07f6e41e3efd48a096a1ede4dc7fab5e55/src/Wasi.AspNetCore.Server.Native/native/tcp_listener_loop.c#L65-L66 |
Implementation assumes the listener to be in non-blocking mode (see
errno !=__WASI_ERRNO_AGAINcheck on L64), but it never actually ensures it is.This commit changes that and ensures that the listener is non-blocking.
Refs bytecodealliance/wasmtime#5633