From d5fad33b4eaa39722ea1dc96de9446ffc4805e01 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 17 Sep 2009 16:44:20 +0100 Subject: Fix code which looked for leaked FDs between each command. This code was not checking the return value from system() so it failed if uncommented. Add ignore_value() around the call to system. However, leave the code still disabled. --- daemon/proto.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'daemon/proto.c') diff --git a/daemon/proto.c b/daemon/proto.c index c0e39275..c22bbee4 100644 --- a/daemon/proto.c +++ b/daemon/proto.c @@ -29,6 +29,8 @@ #include #include +#include "ignore-value.h" + #include "daemon.h" #include "../src/guestfs_protocol.h" @@ -53,13 +55,11 @@ main_loop (int _sock) sock = _sock; for (;;) { -#if 0 /* Most common errors are leaked memory and leaked file descriptors, * so run this between each command: */ - if (verbose) - system ("ls -l /proc/self/fd"); -#endif + if (verbose && 0) + ignore_value (system ("ls -l /proc/self/fd")); /* Read the length word. */ if (xread (sock, lenbuf, 4) == -1) -- cgit