help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Re: [PATCH] Remove unused variable from File class>>#ch


From: Holger Hans Peter Freyther
Subject: [Help-smalltalk] Re: [PATCH] Remove unused variable from File class>>#checkError:
Date: Sun, 20 Jun 2010 23:22:07 +0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b1 Thunderbird/3.0.4

On 06/18/2010 05:34 PM, Paolo Bonzini wrote:

>> Sorry, of course we need to pass the port as a number... the point is
>> more that binding to googles public ip on my system should fail and it
>> didn't.
> 
> Why?  You just won't get any datagram, AFAIU.

Sure, you will not get any datagram and the read should fail pretty fast.

st> Sockets.DatagramSocket local: '8.8.8.8' port: 23000
Sockets.DatagramSocket[0.0.0.0:0]

generates the following syscalls:

bind(3, {sa_family=AF_INET, sin_port=htons(23000),
sin_addr=inet_addr("8.8.8.8")}, 16) = -1 EADDRNOTAVAIL (Cannot assign
requested address)
rt_sigprocmask(SIG_BLOCK, ~[QUIT ILL ABRT BUS SEGV RTMIN RT_1], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
rt_sigprocmask(SIG_BLOCK, ~[QUIT ILL ABRT BUS SEGV RTMIN RT_1], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("0.0.0.0")}, [16]) = 0

and I think the failure of the bind should be propagated as an
exception, it does not as the SOL_ERROR is not reporting any error (okay
I didn't verify that).







reply via email to

[Prev in Thread] Current Thread [Next in Thread]