You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5783 Reporter: vouillon Status: acknowledged (set by @damiendoligez on 2013-01-03T15:37:06Z) Resolution: open Priority: normal Severity: minor Version: 4.00.1 Category: platform support (windows, cross-compilation, etc) Tags: patch Monitored by:@dbuenzli
Bug description
The C function [select_data_dispatch] checks whether the socket is connected, and systematically consider that the socket is ready when it is not connected.
Thus, when this function is involved, there is no way to wait for the completion of a non-blocking socket connection.
Since OCaml 4, there is a fast path when all file descriptors are sockets. Hence, the bug only occurs when we are also selecting file descriptors of a different kind.
Maybe the check in [select_data_dispatch] can just be removed? The consequence would be that a non-connected socket will never be reported as ready by [Unix.select] (contrary to what happens under Unix). But this is already the case with the Winsock implementation of [select], which is used when [Unix.select] is called only with sockets...
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.
Original bug ID: 5783
Reporter: vouillon
Status: acknowledged (set by @damiendoligez on 2013-01-03T15:37:06Z)
Resolution: open
Priority: normal
Severity: minor
Version: 4.00.1
Category: platform support (windows, cross-compilation, etc)
Tags: patch
Monitored by: @dbuenzli
Bug description
The C function [select_data_dispatch] checks whether the socket is connected, and systematically consider that the socket is ready when it is not connected.
Thus, when this function is involved, there is no way to wait for the completion of a non-blocking socket connection.
Since OCaml 4, there is a fast path when all file descriptors are sockets. Hence, the bug only occurs when we are also selecting file descriptors of a different kind.
The attached piece of code reproduces the bug.
File attachments
The text was updated successfully, but these errors were encountered: