mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-05 03:07:56 +00:00
still open files is dumped out exit. Enabled using the --track-fds switch. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2031
22 lines
391 B
C
22 lines
391 B
C
#include <unistd.h>
|
|
#include <stdio.h>
|
|
#include <fcntl.h>
|
|
|
|
int
|
|
main (int argc, char **argv)
|
|
{
|
|
char filename[24];
|
|
|
|
/*
|
|
* 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);
|
|
|
|
sprintf(filename, "/tmp/file.%d\n", getpid());
|
|
creat(filename, 0);
|
|
unlink(filename);
|
|
return 0;
|
|
}
|