After some additional unit testing, I've discovered that this fix was
necessary but not sufficient to fix the problem on MacOS 10.4. Older
BSD-based systems[1] have a problem with calling connect a second time
on a socket, and this is what the python 2.4.4 code does deep in the
socket layer when the timeout is positive, i.e., for a non-blocking
socket. This results in getting an EINVAL error code back from the socket.
I've updated the webrev to include an additional check for errno.EINVAL
with a comment about this being needed for BSD-based systems.
New webrev: http://cr.opensolaris.org/~tmueller/cr-2695,2705-2/
The difference from the first one is this:
309 - if errnum == errno.ECONNREFUSED:
312 + if errnum == errno.ECONNREFUSED or errnum ==
errno.EINVAL:
310 313 # If we could not connect to the port, we
know it isn't
311 - # in use.
314 + # in use. The EINVAL comes from BSD-based
systems
315 + # (e.g., Mac/OS 10.4) that do not handle a
non-blocking
316 + # failed connect properly
312 317 return True, None
[1] http://mail.python.org/pipermail/python-bugs-list/2007-March/037468.html
Thanks.
Tom
Danek Duvall wrote:
On Tue, Jul 29, 2008 at 09:11:48PM -0500, Tom Mueller (pkg-discuss) wrote:
http://cr.opensolaris.org/~tmueller/cr-2695,2705/
This looks fine to me.
Thanks,
Danek
begin:vcard
fn:Tom Mueller
n:Mueller;Tom
org:Sun Microsystems, Inc.;Update Center Software
adr:;;21915 Hillandale Dr;Elkhorn;NE;68022;USA
email;internet:[EMAIL PROTECTED]
title:Senior Staff Engineer
tel;work:877-250-4011
tel;fax:877-250-4011
tel;home:402-916-9943
x-mozilla-html:TRUE
version:2.1
end:vcard
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss