[PATCH] Fix code which looked for leaked FDs between each command.
-- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html
Richard W.M. Jones wrote:
# Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) gl_MODULES([ hash + ignore-value manywarnings warnings ]) diff --git a/daemon/proto.c b/daemon/proto.c index c0e3927..c22bbee 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"));
Ack. I like the replacement of #if-0 with if (... && 0), too.
participants (2)
-
Jim Meyering -
Richard W.M. Jones