summaryrefslogtreecommitdiffstats
path: root/daemon/proto.c
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-09-17 16:44:20 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-09-17 16:58:09 +0100
commitd5fad33b4eaa39722ea1dc96de9446ffc4805e01 (patch)
tree61e7b245494ff6e3ba27a9b8bc25df96b232e53d /daemon/proto.c
parentda0a4f8d1f6ddd302ceba028d87c6e009589e503 (diff)
downloadlibguestfs-d5fad33b4eaa39722ea1dc96de9446ffc4805e01.tar.gz
libguestfs-d5fad33b4eaa39722ea1dc96de9446ffc4805e01.tar.xz
libguestfs-d5fad33b4eaa39722ea1dc96de9446ffc4805e01.zip
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.
Diffstat (limited to 'daemon/proto.c')
-rw-r--r--daemon/proto.c8
1 files changed, 4 insertions, 4 deletions
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 <rpc/types.h>
#include <rpc/xdr.h>
+#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)