Hello all,
This code fails on WindowsInstallerRuby
ruby 1.7.2 (2002-07-02) [i386-mswin32]
with
[BUG] rb_sys_fail() - errno == 0
but runs on
ruby 1.6.6 (2001-12-26) [i486-linux]
without a problem.
Bug? Well, it says so
Danny
Hello all,
This code fails on WindowsInstallerRuby
ruby 1.7.2 (2002-07-02) [i386-mswin32]
with
[BUG] rb_sys_fail() - errno == 0
but runs on
ruby 1.6.6 (2001-12-26) [i486-linux]
without a problem.
Bug? Well, it says so
Danny
ah ha! thatâs may be the root of tcpâs and httpâs bugs as well!
i had to switch back to 1.6.7 becasue of them. (linux though)
On Tue, 2002-09-10 at 13:04, Danny van Bruggen wrote:
Hello all,
This code fails on WindowsInstallerRuby
ruby 1.7.2 (2002-07-02) [i386-mswin32]
with
[BUG] rb_sys_fail() - errno == 0
but runs on
ruby 1.6.6 (2001-12-26) [i486-linux]
without a problem.Bug? Well, it says so
Danny
require âsocketâ
server=UDPSocket.open
server.bind(nil, 50403)
client=UDPSocket.open
client.connect(â127.0.0.1â, 50403)
puts âworks:â
client.send(â12345â,0)
server.recvfrom(5)
puts âfails:â
client.send(â123456789â,0)
server.recvfrom(5)
â
tom sawyer, aka transami
transami@transami.net
Hmm, I wonder if Winsock isnât setting errno properly. If thatâs the
case, then rb_sys_fail() wonât be sufficient for socket.c.
Paul
On Wed, Sep 11, 2002 at 04:04:50AM +0900, Danny van Bruggen wrote:
[BUG] rb_sys_fail() - errno == 0
Hereâs another one:
works:
fails:
-:11:in `recvfromâ: Unknown Error - ârecvfrom(2)â (Errno::E10040)
from -:11
C:\ruby\bin>ruby -v
ruby 1.6.6 (2001-12-26) [i586-mswin32]
On Wed, 11 Sep 2002, Paul Brannan wrote:
On Wed, Sep 11, 2002 at 04:04:50AM +0900, Danny van Bruggen wrote:
[BUG] rb_sys_fail() - errno == 0
Hmm, I wonder if Winsock isnât setting errno properly. If thatâs the
case, then rb_sys_fail() wonât be sufficient for socket.c.Paul
According to http://www.sockets.com/a_c2.htm (and a few other sources),
meaningful winsock error information cannot be obtained from errno;
WSAGetLastError() should be used instead. In this situation,
rb_sys_fail wonât work.
If I actually had a compiler installed on Windows, Iâd write a patch,
but this should be an easy fix anyway.
This explains why the code was failing with such a strange error
message; I wonder why it was failing in the first place, though.
Paul
On Wed, Sep 11, 2002 at 05:37:40AM +0900, Paul Brannan wrote:
On Wed, Sep 11, 2002 at 04:04:50AM +0900, Danny van Bruggen wrote:
[BUG] rb_sys_fail() - errno == 0
Hmm, I wonder if Winsock isnât setting errno properly. If thatâs the
case, then rb_sys_fail() wonât be sufficient for socket.c.
The other message I sent had a reasonable winsock error for some
reason: 10040.
winsock2.h tells me
#define WSABASEERR 10000
#define WSAEMSGSIZE (WSABASEERR+40)
then we get
http://mail.python.org/pipermail/patches/2001-February/004072.html
which states that I did a recv but the datagram was too big for my
buffer. Thatâs right. Linux didnât feel that was an error though. And,
something has changed between Ruby 1.6.6 and 1.7.2 that shouldnât have
been changedâŚ
There must be someone with a compiler and sourcetree set up for fixing
Danny
On Wed, Sep 11, 2002 at 05:37:40AM +0900, Paul Brannan wrote:
On Wed, Sep 11, 2002 at 04:04:50AM +0900, Danny van Bruggen wrote:
[BUG] rb_sys_fail() - errno == 0
Hmm, I wonder if Winsock isnât setting errno properly. If thatâs the
case, then rb_sys_fail() wonât be sufficient for socket.c.According to http://www.sockets.com/a_c2.htm (and a few other sources),
meaningful winsock error information cannot be obtained from errno;
WSAGetLastError() should be used instead. In this situation,
rb_sys_fail wonât work.If I actually had a compiler installed on Windows, Iâd write a patch,
but this should be an easy fix anyway.This explains why the code was failing with such a strange error
message; I wonder why it was failing in the first place, though.Paul
Hi,
At Thu, 12 Sep 2002 04:33:54 +0900, Paul Brannan wrote:
[BUG] rb_sys_fail() - errno == 0
Hmm, I wonder if Winsock isnât setting errno properly. If thatâs the
case, then rb_sys_fail() wonât be sufficient for socket.c.According to http://www.sockets.com/a_c2.htm (and a few other sources),
meaningful winsock error information cannot be obtained from errno;
WSAGetLastError() should be used instead. In this situation,
rb_sys_fail wonât work.
errno should be set in win32/win32.c:rb_w32_recvfrom().
â
Nobu Nakada
If it should be set, then why was an âerrno == 0â error generated?
Paul
On Thu, Sep 12, 2002 at 04:06:32PM +0900, Nobuyoshi Nakada wrote:
errno should be set in win32/win32.c:rb_w32_recvfrom().
Hi,
At Thu, 12 Sep 2002 22:51:15 +0900, Paul Brannan wrote:
errno should be set in win32/win32.c:rb_w32_recvfrom().
If it should be set, then why was an âerrno == 0â error generated?
Itâs the question.
I found myself misread a little, error in [ruby-talk:49898]
apparently differs from one in first article. If so, in which
line it occurred?
â
Nobu Nakada
Both the error in [ruby-talk:49768] and the error in [ruby-talk:49898]
mentioned ârecvfrom(2).â There is only one line in socket.c which calls
rb_sys_fail with a parameter of ârecvfrom(2)â.
Or do you mean which line in the Ruby code? The first article didnât
mention a line number, but the latter one did. I suspect they both
occurred on line 11, though.
Paul
On Thu, Sep 12, 2002 at 11:20:23PM +0900, nobu.nokada@softhome.net wrote:
At Thu, 12 Sep 2002 22:51:15 +0900, Paul Brannan wrote:
If it should be set, then why was an âerrno == 0â error generated?
Itâs the question.
I found myself misread a little, error in [ruby-talk:49898]
apparently differs from one in first article. If so, in which
line it occurred?