Robert Walsh f9ea43d896 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
2003-11-17 17:45:00 +00:00

16 lines
264 B
C

#include <fcntl.h>
int
main (int argc, char **argv)
{
/*
* 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);
open("/dev/null", O_RDONLY);
return 0;
}