repo.or.cz
/
valgrind.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
mc_translate.c: enable further uses of DLexpensive for scalar EQ/NE comparisons
[valgrind.git]
/
none
/
tests
/
closeall.c
blob
facf6a580c2974946d2ef58563b2d4cbc7a3113b
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <sys/resource.h>
4
#include <unistd.h>
5
6
int
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
}