repo.or.cz
/
libc-test.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
functional: add mntent test
[libc-test.git]
/
src
/
common
/
fdfill.c
blob
6419e937f630c2635ba9f34fb21c2ead23f045c5
1
#include <fcntl.h>
2
#include <unistd.h>
3
#include <errno.h>
4
#include
"test.h"
5
6
void
t_fdfill
(
void
)
7
{
8
int
fd
=
1
;
9
if
(
dup
(
fd
) == -
1
) {
10
if
(
errno
==
EMFILE
)
11
return
;
12
fd
=
open
(
"/dev/null"
,
O_RDONLY
);
13
}
14
while
(
dup
(
fd
) != -
1
);
15
}