drd/tests/swapcontext: Improve the portability of this test further
[valgrind.git] / none / tests / fdleak_fcntl.c
blobc57a2608b65a9fc30dea0832967c92386ca33a7f
1 #include <unistd.h>
2 #include <stdio.h>
3 #include <fcntl.h>
4 #include "fdleak.h"
6 int main (int argc, char **argv)
8 int s1;
10 CLOSE_INHERITED_FDS;
12 s1 = DO( open("/dev/null", O_RDONLY) );
13 (void) DO( fcntl(s1, F_DUPFD, s1) );
15 return 0;