From: "Richard W.M. Jones" <rjones(a)redhat.com>
This updates commit 55e3b8711f340a2f8bdb8ee8ff99deb40b4e9108.
(cherry picked from commit e7b06f7cf84d0a87d0c80d56b06e7e0017e55adc)
---
src/conn-socket.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/conn-socket.c b/src/conn-socket.c
index e37ac23..1ad92cf 100644
--- a/src/conn-socket.c
+++ b/src/conn-socket.c
@@ -330,8 +330,14 @@ handle_log_message (guestfs_h *g,
if (g->verbose) {
const char *valgrind_canary = "DAEMON VALGRIND FAILED";
- if (memmem (buf, n, valgrind_canary, strlen (valgrind_canary)) != NULL)
+ if (memmem (buf, n, valgrind_canary, strlen (valgrind_canary)) != NULL) {
+ fprintf (stderr,
+ "Detected valgrind failure in the daemon! Exiting with exit code
119.\n"
+ "See log messages printed above.\n"
+ "Note: This happens because libguestfs was configured with\n"
+ "'--enable-valgrind-daemon' which should not be used in
production builds.\n");
exit (119);
+ }
}
#endif
--
1.8.3.1