Message202984
> 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, |
|
Date |
User |
Action |
Args |
2013-11-16 00:10:11 | neologix | set | recipients:
+ neologix, mpb |
2013-11-16 00:10:11 | neologix | link | issue19530 messages |
2013-11-16 00:10:11 | neologix | create | |
|