Make recvfrom() block only the calling thread, not the whole system
( same trick as used for accept() ).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@415 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_libpthread.c b/coregrind/vg_libpthread.c
index 5a76219..6911474 100644
--- a/coregrind/vg_libpthread.c
+++ b/coregrind/vg_libpthread.c
@@ -1660,6 +1660,8 @@
struct sockaddr *from, socklen_t *fromlen)
{
__my_pthread_testcancel();
+ wait_for_fd_to_be_readable_or_erring(s);
+ __my_pthread_testcancel();
return __libc_recvfrom(s, buf, len, flags, from, fromlen);
}