path: root/include/ruby/win32.h
diff options
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-10 10:42:19 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-10 10:42:19 +0000
commitfd9f6bde957ce681fed49182be02124ecc89b362 (patch)
treead4a0c12e80ad4ca7c60d6dd8c18be960d5dde8c /include/ruby/win32.h
parent6ccf3d68c21c2eabefe80f9ff1f7b5296a9ddfd2 (diff)
* win32/win32.c, include/win32/win32.h (rb_w32_set_nonblock): new
function to support nonblock-mode of pipes. * win32/win32.c (rb_w32_read): nonblock-mode pipe returns ERROR_NO_DATA if there is no data, but also returns it if remote-end is closed. * win32/win32.c (rb_w32_write): if cannot to write any data, it may be blocking. * io.c (rb_io_set_nonblock): use rb_w32_set_nonblock for Windows. * ext/io/nonblock/nonblock.c (rb_io_nonblock_set): use ruby's API when setting nonblock-mode. * test/ruby/test_io.rb: test nonblock pipes on Windows. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/win32.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ruby/win32.h b/include/ruby/win32.h
index a6996bc..4b93862 100644
--- a/include/ruby/win32.h
+++ b/include/ruby/win32.h
@@ -327,6 +327,7 @@ extern rb_pid_t rb_w32_uaspawn(int, const char *, char *const *);
extern rb_pid_t rb_w32_uaspawn_flags(int, const char *, char *const *, DWORD);
extern int kill(int, int);
extern int fcntl(int, int, ...);
+extern int rb_w32_set_nonblock(int);
extern rb_pid_t rb_w32_getpid(void);
extern rb_pid_t rb_w32_getppid(void);
#if !defined(__BORLANDC__)