[Twisted-Python] socket error 22

Werner Thie wthie at thiengineering.ch
Tue May 13 09:29:01 MDT 2008


Works like a charm on OpenBSD, with or w/o time.sleep(5).

What now?

Regarding the buildslave I might be able to setup a machine, though only 
connected via some not so fast DSL lines. If DSL is sufficient, tell me 
and I'll take this a step further.

Thanks, Werner

Eric Faurot wrote:
> On Thu, May 8, 2008 at 8:14 PM, Jean-Paul Calderone <exarkun at divmod.com> wrote:
> 
>>  I wonder if OpenBSD gives back EINVAL for getsockname(2) when the peer has
>>  done a shutdown of the socket.  Can you tell me what this program does?
>>
>>    from socket import socket
>>    port = socket()
>>    port.bind(('', 0))
>>    port.listen(1)
>>    client = socket()
>>    client.setblocking(False)
>>    client.connect_ex(port.getsockname())
>>    server, clientAddr = port.accept()
>>    print 'Before close', server.getsockname()
>>    client.close()
>>    print 'After close', server.getsockname()
>>
>>  If it finishes without error, try it with a time.sleep(5) before the final
>>  line.
> 
> The program works fine in both case.
> 
>>  Also, to re-iterate what I believe someone else already said in this
>> thread,
>>  the best way to have Twisted work on OpenBSD is for there to be an OpenBSD
>>  buildslave.  It's easy to set up new buildslaves, the only requirements are
>>  that the machine can make outgoing TCP connections to the master and that
>> it
>>  can run the Twisted test suite whenever there's a trunk change or someone
>>  needs to test something on the platform.
> 
> I wish I could do something, but I don't have a "spare" machine for this atm.
> 
> Eric.
> 
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python




More information about the Twisted-Python mailing list