Make recv block only the calling thread, not the entire process.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@451
This commit is contained in:
Julian Seward 2002-06-20 07:58:33 +00:00
parent 7437ce425c
commit c489fb0318
3 changed files with 6 additions and 0 deletions

View 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);
}

View 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);
}

View 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);
}