Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The function `is_blocking` called by `set_blocking` deals with all the corner-cases. In particular, on Windows, calling `Unix.clear_non_block` and `Unix.set_non_block` is only supported on non-socket file descriptors. The function `is_blocking` deals with that correctly, but the current implementation used to call the two Unix functions indiscriminately, causing ENOTSOCK exceptions on Windows. By delegating the handling of `set_flags` and `blocking` fields to `set_blocking` and `is_blocking`, we make `dup` and `dup2` more portable. Signed-off-by: Antonin Décimo <[email protected]>
- Loading branch information