]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make recv block only the calling thread, not the entire process.
authorJulian Seward <jseward@acm.org>
Thu, 20 Jun 2002 07:58:33 +0000 (07:58 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 20 Jun 2002 07:58:33 +0000 (07:58 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@451

coregrind/arch/x86-linux/vg_libpthread.c
coregrind/vg_libpthread.c
vg_libpthread.c

index b373e10ee236839b3845069bc657a7682df4cf86..3220cca1a7eba70dde6baf3c52fa40589c0945cb 100644 (file)
@@ -1689,6 +1689,8 @@ int __libc_recv(int s, void *buf, size_t len, int flags);
 __attribute__((weak))
 int recv(int s, void *buf, size_t len, int flags)
 {
+   __my_pthread_testcancel();
+   wait_for_fd_to_be_readable_or_erring(s);
    __my_pthread_testcancel();
    return __libc_recv(s, buf, len, flags);
 }
index b373e10ee236839b3845069bc657a7682df4cf86..3220cca1a7eba70dde6baf3c52fa40589c0945cb 100644 (file)
@@ -1689,6 +1689,8 @@ int __libc_recv(int s, void *buf, size_t len, int flags);
 __attribute__((weak))
 int recv(int s, void *buf, size_t len, int flags)
 {
+   __my_pthread_testcancel();
+   wait_for_fd_to_be_readable_or_erring(s);
    __my_pthread_testcancel();
    return __libc_recv(s, buf, len, flags);
 }
index b373e10ee236839b3845069bc657a7682df4cf86..3220cca1a7eba70dde6baf3c52fa40589c0945cb 100644 (file)
@@ -1689,6 +1689,8 @@ int __libc_recv(int s, void *buf, size_t len, int flags);
 __attribute__((weak))
 int recv(int s, void *buf, size_t len, int flags)
 {
+   __my_pthread_testcancel();
+   wait_for_fd_to_be_readable_or_erring(s);
    __my_pthread_testcancel();
    return __libc_recv(s, buf, len, flags);
 }