|Anonymous | Login | Signup for a new account||2013-05-19 06:05 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005783||OCaml||OCaml windows||public||2012-10-10 15:57||2013-01-03 16:37|
|Target Version||4.00.2+dev||Fixed in Version|
|Summary||0005783: Unix.select returns immediately when waiting for the completion of a non-blocking socket connection|
|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.
|Tags||No tags attached.|
|Attached Files||bug.ml [^] (761 bytes) 2012-10-10 15:57|
|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...|
|2012-10-10 15:57||vouillon||New Issue|
|2012-10-10 15:57||vouillon||File Added: bug.ml|
|2012-10-10 17:14||vouillon||Note Added: 0008241|
|2013-01-03 16:37||doligez||Status||new => acknowledged|
|2013-01-03 16:37||doligez||Target Version||=> 4.00.2+dev|
|Copyright © 2000 - 2011 MantisBT Group|