ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:24234] [Bug #1753] non success open client socket not detected on windows
@ 2009-07-09 11:52 regis d'aubarede
  2009-07-10 13:38 ` [ruby-core:24252] " Roger Pack
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: regis d'aubarede @ 2009-07-09 11:52 UTC (permalink / raw
  To: ruby-core

Bug #1753: non success open client socket not detected on windows
http://redmine.ruby-lang.org/issues/show/1753

Author: regis d'aubarede
Status: Open, Priority: Normal
ruby -v: 1.9.1

Here the code and execution with different ruby version :


D:\usr\ruby\local\dsd17>type z_essai.rb
require 'socket'

p "*************************************************"
p [RUBY_PLATFORM,RUBY_VERSION,RUBY_RELEASE_DATE]
p "*************************************************"
p "Before openning client socket on non existant server"
begin
  TCPSocket.open("localhost",4444) { |io| p [io,io.closed?]  }
  p "after openning client socket on non existant server"
rescue
  p "good, non connection is detected"
  p $!
end
p "*************************************************"


D:\usr\ruby\local\dsd17>ruby z_essai.rb
"*************************************************"
["i386-mswin32", "1.8.6", "2007-03-13"]
"*************************************************"
"Before openning client socket on non existant server"
"good, non connection is detected"
#<Errno::EBADF: Bad file descriptor - connect(2)>
"*************************************************"

D:\usr\ruby\local\dsd17>jruby z_essai.rb
"*************************************************"
["java", "1.8.6", "2009-06-15"]
"*************************************************"
"Before openning client socket on non existant server"
"good, non connection is detected"
#<Errno::ECONNREFUSED: Connection refused - Connection refused>
"*************************************************"


D:\usr\ruby\local\dsd17>ruby19 z_essai.rb
"*************************************************"
["i386-mswin32", "1.9.1", "2009-01-30"]
"*************************************************"
"Before openning client socket on non existant server"
[#<TCPSocket:0xabf914>, false]
"after openning client socket on non existant server"
"*************************************************"

D:\usr\ruby\local\dsd17>


----------------------------------------
http://redmine.ruby-lang.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:24252] [Bug #1753] non success open client socket not detected on windows
  2009-07-09 11:52 [ruby-core:24234] [Bug #1753] non success open client socket not detected on windows regis d'aubarede
@ 2009-07-10 13:38 ` Roger Pack
  2009-07-10 14:38 ` [ruby-core:24253] " Heesob Park
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Roger Pack @ 2009-07-10 13:38 UTC (permalink / raw
  To: ruby-core

Issue #1753 has been updated by Roger Pack.


I get this too [for mingw 1.9].  Odd.
=r
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1753

----------------------------------------
http://redmine.ruby-lang.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:24253] [Bug #1753] non success open client socket not detected on windows
  2009-07-09 11:52 [ruby-core:24234] [Bug #1753] non success open client socket not detected on windows regis d'aubarede
  2009-07-10 13:38 ` [ruby-core:24252] " Roger Pack
@ 2009-07-10 14:38 ` Heesob Park
  2009-08-03  6:04 ` [ruby-core:24707] " Heesob Park
  2009-09-05 16:42 ` [ruby-core:25412] [Backport #1753](Assigned) " Shyouhei Urabe
  3 siblings, 0 replies; 5+ messages in thread
From: Heesob Park @ 2009-07-10 14:38 UTC (permalink / raw
  To: ruby-core

Issue #1753 has been updated by Heesob Park.


This patch will fix the problem.

--- win32.c     2009-01-16 00:37:20.000000000 +0900
+++ win32.c.new 2009-07-10 23:34:06.000000000 +0900
@@ -2397,6 +2397,7 @@
            r = WSAGetLastError();
            if (r != WSAEWOULDBLOCK) {
                errno = map_errno(r);
+               r = -1;
            }
            else {
                errno = EINPROGRESS;


----------------------------------------
http://redmine.ruby-lang.org/issues/show/1753

----------------------------------------
http://redmine.ruby-lang.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:24707] [Bug #1753] non success open client socket not detected on windows
  2009-07-09 11:52 [ruby-core:24234] [Bug #1753] non success open client socket not detected on windows regis d'aubarede
  2009-07-10 13:38 ` [ruby-core:24252] " Roger Pack
  2009-07-10 14:38 ` [ruby-core:24253] " Heesob Park
@ 2009-08-03  6:04 ` Heesob Park
  2009-09-05 16:42 ` [ruby-core:25412] [Backport #1753](Assigned) " Shyouhei Urabe
  3 siblings, 0 replies; 5+ messages in thread
From: Heesob Park @ 2009-08-03  6:04 UTC (permalink / raw
  To: ruby-core

Issue #1753 has been updated by Heesob Park.


This is the bug of ruby 1.9.x not 1.8.7.
Is there any reason not applying this patch?


----------------------------------------
http://redmine.ruby-lang.org/issues/show/1753

----------------------------------------
http://redmine.ruby-lang.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:25412] [Backport #1753](Assigned) non success open client socket not detected on windows
  2009-07-09 11:52 [ruby-core:24234] [Bug #1753] non success open client socket not detected on windows regis d'aubarede
                   ` (2 preceding siblings ...)
  2009-08-03  6:04 ` [ruby-core:24707] " Heesob Park
@ 2009-09-05 16:42 ` Shyouhei Urabe
  3 siblings, 0 replies; 5+ messages in thread
From: Shyouhei Urabe @ 2009-09-05 16:42 UTC (permalink / raw
  To: ruby-core

Issue #1753 has been updated by Shyouhei Urabe.

Status changed from Open to Assigned
Assigned to set to Kirk Haines

I heard that this bug has been fixed for trunk and ruby_1_8.  I've also backported that fix to 1.8.7.
Sorry for not checking other branches e.g, 1.8.6.  Assigning to Kirk Haines for the moment.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1753

----------------------------------------
http://redmine.ruby-lang.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-09-05 16:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-09 11:52 [ruby-core:24234] [Bug #1753] non success open client socket not detected on windows regis d'aubarede
2009-07-10 13:38 ` [ruby-core:24252] " Roger Pack
2009-07-10 14:38 ` [ruby-core:24253] " Heesob Park
2009-08-03  6:04 ` [ruby-core:24707] " Heesob Park
2009-09-05 16:42 ` [ruby-core:25412] [Backport #1753](Assigned) " Shyouhei Urabe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).