Sign in
android
/
platform
/
external
/
libc-test
/
c8942136be3139b22478ad83d5d624587b98f10b
/
.
/
src
/
common
/
fdfill.c
blob: 6419e937f630c2635ba9f34fb21c2ead23f045c5 [
file
] [
log
] [
blame
]
#include
<fcntl.h>
#include
<unistd.h>
#include
<errno.h>
#include
"test.h"
void
t_fdfill
(
void
)
{
int
fd
=
1
;
if
(
dup
(
fd
)
==
-
1
)
{
if
(
errno
==
EMFILE
)
return
;
fd
=
open
(
"/dev/null"
,
O_RDONLY
);
}
while
(
dup
(
fd
)
!=
-
1
);
}