[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-09-25 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: Are you sure of that? I don't see how Python behaviour would be different to a the same program written in C. Could you write a short example written in C to prove that? I also found this surprising, so I wroke a quick C program

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-09-25 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Closing, as suggested by neologix -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8831 ___

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-05-27 Thread Alessandro Roat
New submission from Alessandro Roat alexr...@gmail.com: A thread blocked on a recv or a recvfrom method on a UDP socket (waiting for a datagram) can not be unlocked calling a .close() from a different thread. This is in contrast with the standard C++/C behavior, where a close() on a socket

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-05-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8831 ___ ___

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-05-27 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Can you provide a patch? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8831 ___

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-05-27 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: And maybe also a short example? :) -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8831 ___

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-05-27 Thread Alessandro Roat
Alessandro Roat alexr...@gmail.com added the comment: This is an example, test it with netcat (nc -u localhost ) on linux (ubuntu 9.10). Lauch it with python scriptname, a prompt will appear. Type start to launch the server, test the server sending UDP packets with netcat, the lenght of

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-05-27 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This is in contrast with the standard C++/C behavior, where a close() on a socket causes an asynchronous and immediate exception/return with error on the functions that are using the socket at the same time (but in another