blob: facf6a580c2974946d2ef58563b2d4cbc7a3113b [file] [log] [blame]
nethercote009259b2004-02-15 16:12:35 +00001#include <stdio.h>
2#include <stdlib.h>
3#include <sys/resource.h>
4#include <unistd.h>
5
6int main(int argc, char **argv)
7{
8 struct rlimit lim;
9 int fd;
10
11 getrlimit(RLIMIT_NOFILE, &lim);
12
13 for ( fd = 3; fd < lim.rlim_cur; fd++ )
14 close( fd );
15
16 exit( 0 );
17}