[ruby-cvs:55511] usa:r48361 (trunk): * win32/win32.c, include/win32/win32.h (rb_w32_set_nonblock): new

usa at ruby-lang.org usa at ruby-lang.org
Mon Nov 10 19:42:21 JST 2014


usa	2014-11-10 19:42:19 +0900 (Mon, 10 Nov 2014)

  New Revision: 48361

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48361

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/ext/io/nonblock/nonblock.c
    trunk/include/ruby/win32.h
    trunk/io.c
    trunk/test/ruby/test_io.rb
    trunk/win32/win32.c


More information about the ruby-cvs mailing list