Add a facility for tracking open file descriptors. Information about
still open files is dumped out exit. Enabled using the --track-fds
switch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2031 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/corecheck/tests/fdleak_pipe.c b/corecheck/tests/fdleak_pipe.c
new file mode 100644
index 0000000..6c2d566
--- /dev/null
+++ b/corecheck/tests/fdleak_pipe.c
@@ -0,0 +1,17 @@
+#include <unistd.h>
+
+int
+main (int argc, char **argv)
+{
+ int fds[2];
+
+ /*
+ * Fedora Core 1's Perl opens /dev/pts/2 as fd 10. Let's close it
+ * now to get consistent results across different releases.
+ */
+
+ close(10);
+
+ pipe(fds);
+ return 0;
+}