conformance fixes
[libc-test.git] / src / common / fdfill.c
blob6419e937f630c2635ba9f34fb21c2ead23f045c5
1 #include <fcntl.h>
2 #include <unistd.h>
3 #include <errno.h>
4 #include "test.h"
6 void t_fdfill(void)
8 int fd = 1;
9 if (dup(fd) == -1) {
10 if (errno == EMFILE)
11 return;
12 fd = open("/dev/null", O_RDONLY);
14 while(dup(fd) != -1);