drd/tests/std_thread2: Make this test independent of the libstdc++ version
[valgrind.git] / none / tests / fdleak_creat.c
blob994692adaf90945894a290c75e9ec4d4580c5bec
1 #include <unistd.h>
2 #include <stdio.h>
3 #include <fcntl.h>
4 #include "fdleak.h"
6 int main (int argc, char **argv)
8 char filename[24];
10 CLOSE_INHERITED_FDS;
12 sprintf(filename, "/tmp/file.%d", getpid());
13 (void) DO( creat(filename, 0) );
14 (void) DO( unlink(filename) );
15 return 0;