File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,10 +29,7 @@ VALUE IO_Event_Selector_process_status_wait(rb_pid_t pid, int flags)
2929int IO_Event_Selector_nonblock_set (int file_descriptor )
3030{
3131#ifdef _WIN32
32- u_long nonblock = 1 ;
33- ioctlsocket (file_descriptor , FIONBIO , & nonblock );
34- // Windows does not provide any way to know this, so we always restore it back to unset:
35- return 0 ;
32+ rb_w32_set_nonblock (file_descriptor );
3633#else
3734 // Get the current mode:
3835 int flags = fcntl (file_descriptor , F_GETFL , 0 );
@@ -50,8 +47,6 @@ void IO_Event_Selector_nonblock_restore(int file_descriptor, int flags)
5047{
5148#ifdef _WIN32
5249 // Yolo...
53- u_long nonblock = flags ;
54- ioctlsocket (file_descriptor , FIONBIO , & nonblock );
5550#else
5651 // The flags didn't have O_NONBLOCK set, so it would have been set, so we need to restore it:
5752 if (!(flags & O_NONBLOCK )) {
You can’t perform that action at this time.
0 commit comments