Apply the following:

The veneers for msgrcv in vg_intercept.c and vg_libpthread.c are not
returning the number of bytes read correctly - they always return zero
for any non-error case, which causes programs using msgrcv to behave
somewhat non-optimally when running under valgrind ;-)

Attached is a patch against 1.9.3 which fixes this.

Tom

--
Tom Hughes (thh@cyberscience.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1424 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_libpthread.c b/coregrind/vg_libpthread.c
index e1dc787..620ddf5 100644
--- a/coregrind/vg_libpthread.c
+++ b/coregrind/vg_libpthread.c
@@ -3376,7 +3376,7 @@
       return -1;
    }
 
-   return 0;
+   return err;
 }