-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use is_blocking in dup and dup2 to fix ENOTSOCK on Windows
On Windows, calling Unix.clear_non_block and Unix.set_non_block is only supported on socket file descriptors. The function is_blocking already deals with the corner cases, but the current implementations of dup and dup2 don't make use of it. Thus, when then dup or dup2 wrappers are called with file socket descriptors, ENOTSOCK errors are raised. The fix is to reuse is_blocking in the wrappers. Signed-off-by: Antonin Décimo <[email protected]>
- Loading branch information
Showing
3 changed files
with
86 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters