FreeBSD _umtx_op: fix bad wrapper for robust lists
[valgrind.git] / none / tests / closeall.c
blobe153d47850ed0e968967d734540310980a01a8b8
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <sys/types.h>
4 #include <sys/time.h>
5 #include <sys/resource.h>
6 #include <unistd.h>
8 int main(int argc, char **argv)
10 struct rlimit lim;
11 int fd;
13 getrlimit(RLIMIT_NOFILE, &lim);
15 for ( fd = 3; fd < lim.rlim_cur; fd++ )
16 close( fd );
18 exit( 0 );