Nicholas Nethercote 1e90b8cb29 whoops
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2252
2004-02-15 16:12:35 +00:00

18 lines
264 B
C

#include <stdio.h>
#include <stdlib.h>
#include <sys/resource.h>
#include <unistd.h>
int main(int argc, char **argv)
{
struct rlimit lim;
int fd;
getrlimit(RLIMIT_NOFILE, &lim);
for ( fd = 3; fd < lim.rlim_cur; fd++ )
close( fd );
exit( 0 );
}