diff options
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c index b948fe0d77..ba8a96e82c 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1836,6 +1836,15 @@ rb_w32_open_osfhandle(intptr_t osfhandle, int flags) } #endif +int +rb_w32_is_valid_fd(int fd) +{ + if (_get_osfhandle(fd) == -1) + return -1; + else + return 0; +} + #undef getsockopt static int |