[前][次][番号順一覧][スレッド一覧][生データ]

ruby-cvs:15519

From: (ocean) <ocean ruby-lang.org>
Date: Sat, 17 Sep 2005 11:42:59 +0900
Subject: [ruby-cvs] ruby, ruby/win32: * win32/win32.c (rb_w32_select): select for socket didn't work.

ocean       Sat, 17 Sep 2005 11:42:59 +0900

  Modified files:
    ruby:
      ChangeLog
    ruby/win32:
      win32.c
  Log:
    * win32/win32.c (rb_w32_select): select for socket didn't work.
      this caused deadlock in drb test. this happened because GetFileType
      for socket handle returns FILE_TYPE_PIPE. Of course, it's not a
      pipe. So socket handle didn't reach winsock's select function.
    
    * win32/win32.c (rb_w32_select): read for pipe still kept brocking
      even if writer handle was closed.
    
        r,w = IO.pipe
    
        Thread.new {
          sleep 3; puts "------- 1"
          w.puts("foo")
          sleep 3; puts "------- 2"
          w.puts("boo")
          sleep 3; puts "------- 3"
          w.close
        }
    
        until r.eof? # should break by w.close but didn't.
          puts r.gets
        end
    
    * win32/win32.c (rb_w32_select): temprary reverted console support
      but it'll be back soon.
  
  Revision    Changes    Path
  1.4584      +28  -0    ruby/ChangeLog
    http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/ChangeLog?cvsroot=src&r1=1.4583&r2=1.4584
  1.171       +100 -222  ruby/win32/win32.c
    http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/win32/win32.c?cvsroot=src&r1=1.170&r2=1.171


[前][次][番号順一覧][スレッド一覧][生データ]