This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients mpb, neologix
Date 2013-11-16.00:10:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAH_1eM0kz5OJcOzb_puys-BeQuWbxZWp8TdmOXkSrrZizU+zjQ@mail.gmail.com>
In-reply-to <1384498421.85.0.820069656679.issue19530@psf.upfronthosting.co.za>
Content
> mpb added the comment:
>
> Someone wrote a kernel patch based on my bug report.
>
> http://www.spinics.net/lists/netdev/msg257653.html

It's just a patch to avoid returning garbage in the address.
But AFAICT, recvfrom() returning 0 is enough to know that the socket
was shut down.

But two things to keep in mind:
- it'll only work on "connected" datagram sockets
- even then, I'm not sure it's supported by POSIX: I can't think of
any spec specifying the behavior in case of cross-thread shutdown (and
close won't unblock for example). Also, I think HP-UX doesn't wake up
the waiting thread in that situation.

So I'd still advise you to either use a timeout or a select().

Cheers,
History
Date User Action Args
2013-11-16 00:10:11neologixsetrecipients: + neologix, mpb
2013-11-16 00:10:11neologixlinkissue19530 messages
2013-11-16 00:10:11neologixcreate